View source: R/scAPAtrap_funlib.R
initScAPAtrap | R Documentation |
Initiate scAPAtrap and check/set parameters
initScAPAtrap(tools, trap.params, inputBam, outputDir, ...)
tools |
A list contains four tools used in scAPAtrap. |
trap.params |
Parameters of running scAPAtrap, see global variable |
inputBam |
Input bam file name. If trap.params$chr is NULL, will try to get chrs from inputBam. |
outputDir |
Output dir for storing scAPAtrap's final output – peaks and counts files. If only dirname is given (e.g., APAres but not ./APAres), then will add path of inputBam to the dir name. If outputDir already exists, an error will be raised to avoid overwritting. However, many temporary files are generated during running scAPAtrap, which could be seen from global variable TRAPFILES. Those files marked with * could be savely deleted. |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
|
NULL. But the input tools, trap.params, inputBam, outputDir may be modifed during initiation.
## Not run:
tools=list(samtools='/home/dell/miniconda3/envs/scAPA/bin/samtools',
umitools='/home/dell/miniconda3/envs/scAPA/bin/umi_tools',
featureCounts="/home/dell/miniconda3/envs/scAPA/bin/featureCounts",
star='/home/dell/miniconda3/envs/scAPA/bin/STAR')
trap.params=TRAP.PARAMS()
trap.params$chr=1:3
## input BAM
dir0='/mnt/64cf3476-350c-46ad-bc48-574fa64a0334/test/xwu/dataFly/'
inputBam=paste0(dir0, "filterCB.bam")
## log file
logf=gsub('.bam', '.scAPAtrap.log', inputBam, fixed=TRUE)
## output dir (will be under inputBam's dir)
outputDir="APA.result"
## one step scAPAtrap
initScAPAtrap(tools=tools, trap.params=trap.params,
inputBam=inputBam, outputDir=outputDir, logf=logf)
## End(Not run)
## just test the function with toCheck=FALSE
initScAPAtrap(tools='just-for-fun.tools',
trap.params=list('just-for-fun.params'),
inputBam='just-for-fun.bam', outputDir='just-for-fun.dir', toCheck=FALSE)
trap.params
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.