bam.cov.gr | R Documentation |
Gets coverage from BAM in supplied GRanges using 'countBam()', returning GRanges with coverage counts in each of the provided GRanges (different from 'bamUtils::bam.cov()') specified as the columns $file, $records, and $nucleotides in the values field
Basically a wrapper for 'Rsamtools::countBam()' with some standard settings for 'Rsamtools::ScanBamParams()'
bam.cov.gr( bam, bai = NULL, intervals = NULL, all = FALSE, count.all = FALSE, isPaired = TRUE, isProperPair = TRUE, isUnmappedQuery = FALSE, hasUnmappedMate = FALSE, isNotPassingQualityControls = FALSE, isDuplicate = FALSE, mc.cores = 1, chunksize = 10, verbose = FALSE, ... )
bam |
string Input BAM file. Advisable to make the input BAM a BamFile instance instead of a plain string, so that the index does not have to be reloaded. |
bai |
string Input BAM index file |
intervals |
GRanges of intervals to retrieve |
all |
boolean Flag to read in all of BAM as a GRanges via 'si2gr(seqinfo())' (default = FALSE) |
isPaired |
boolean Flag indicates whether unpaired (FALSE), paired (TRUE), or any (NA) read should be returned. See documentation for Rsamtools::scanBamFlag(). (default = NA) |
isProperPair |
boolean Flag indicates whether improperly paired (FALSE), properly paired (TRUE), or any (NA) read should be returned. A properly paired read is defined by the alignment algorithm and might, e.g., represent reads aligning to identical reference sequences and with a specified distance. See documentation for Rsamtools::scanBamFlag(). (default = NA) |
isUnmappedQuery |
boolean Flag indicates whether unmapped (TRUE), mapped (FALSE), or any (NA) read should be returned. See documentation for Rsamtools::scanBamFlag(). (default = NA) |
hasUnmappedMate |
boolean Flag indicates whether reads with mapped (FALSE), unmapped (TRUE), or any (NA) mate should be returned. See documentation for Rsamtools::scanBamFlag(). (default = NA) |
isNotPassingQualityControls |
boolean Flag indicates whether reads passing quality controls (FALSE), reads not passing quality controls (TRUE), or any (NA) read should be returned. See documentation for Rsamtools::scanBamFlag(). (default = FALSE) |
isDuplicate |
boolean Flag indicates that un-duplicated (FALSE), duplicated (TRUE), or any (NA) reads should be returned. 'Duplicated' reads may represent PCR or optical duplicates. See documentation for Rsamtools::scanBamFlag(). (default = FALSE) |
mc.cores |
integer Number of cores in mclapply (default = 1) |
chunksize |
integer How many intervals to process per core (default = 10) |
verbose |
boolean "verbose" flag (default = FALSE) |
... |
futher arguments passed into Rsamtools::scanBamFlag() |
GRanges parallel to input GRanges, but with metadata filled in.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.