View source: R/scAPAtrap_funlib.R
findUniqueMap | R Documentation |
findUniqueMap filters a BAM file to preserve unique mappings with samtools. This function will generate .bam (<input>.uniq.bam or UniqSorted.bam if sort=TRUE) and .bai (if index=TRUE). Suffix .Uniq or .UniqSorted will be added to the input BAM file. This function is the same as call samtools in Shell.
findUniqueMap(
samtools.path,
input,
thread = 12,
sort = TRUE,
index = TRUE,
...
)
samtools.path |
The path of the samtools. |
input |
BAM file name. |
thread |
Number of CPU threads, default is 12. |
sort |
Logical value, TRUE to sort the BAM file. |
index |
Logical value, TRUE to build the index. |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
|
Output path of the new BAM file name with only unique mapped reads (<input>.uniq.bam or UniqSorted.bam if sort=TRUE).
samtools.path <- '/home/aa/miniconda2/envs/nar_env/bin/samtools'
input <- './data/demo.bam'
## Not run:
findUniqueMap(samtools.path, input, 24)
## End(Not run)
## only output command lines
findUniqueMap(samtools.path, input, 24, notRun=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.