Description Usage Arguments Value Author(s) Examples
View source: R/getSegmentReadCountsFromBAM.R
Generates the read counts from BAM Files for predefined segments. This is the appropiate choice for exome sequencing data, where the bait regions, target regions or exons are the predefined segments. These counts are necessary for CNV detection methods based on depth of coverage information.
This function can also be run in a parallel version.
1 | getSegmentReadCountsFromBAM(BAMFiles, GR, sampleNames, parallel = 0, ...)
|
BAMFiles |
BAMFiles |
GR |
A genomic ranges object that contains the genomic coordinates of the segments. |
sampleNames |
The corresponding sample names to the BAM Files. |
parallel |
The number of parallel processes to be used for this function. Default=0. |
... |
Additional parameters passed to the function "countBamInGRanges" of the Bioconductor package "exomeCopy". Quality filters for read counts can be adjusted there. Please see "??countBamInGRanges" for more information. |
An instance of "GRanges", that contains the breakpoints of the initial segments and the raw read counts that were extracted from the BAM files. This object can be used as input for cn.mops and other CNV detection methods.
Guenter Klambauer klambauer@bioinf.jku.at
1 2 3 4 | BAMFiles <- list.files(system.file("extdata", package="cn.mops"),pattern=".bam$", full.names=TRUE)
gr <- GRanges(c("20","20"),IRanges(c(60000,70000),c(70000,80000)))
bamDataRanges <- getSegmentReadCountsFromBAM(BAMFiles,GR=gr)
bamDataRanges <- getSegmentReadCountsFromBAM(BAMFiles,GR=gr,parallel=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.