Description Usage Arguments Details Value Author(s) See Also Examples
Fetch the number of input reads from bam files
1 | getBamInputReadCount(bamFiles)
|
bamFiles |
The filenames of input bam files. |
This function reads the header of bam files and searches for the comment line
"INPUTREADCOUNT", which can be added by addInputReadCounts.
The number of input reads are returned. If the "INPUTREADCOUNT" doesn't exist, NA is returned.
Ge Tan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
## This example is not tested because it requires external software "samtools"
bamfile <- system.file("extdata", "ex1.bam", package="Rsamtools",
mustWork=TRUE)
tempBamFile <- tempfile(fileext=".bam")
file.copy(bamfile, tempBamFile)
reads1 <- file.path(system.file("extdata", package="NGS"), "fastq",
"nanocage_ACAGAT_carp_embryo_R1.fastq")
addInputReadCounts(bamFiles=tempBamFile, reads1s=reads1, binary="samtools")
getBamInputReadCount(tempBamFile)
file.remove(tempBamFile)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.