View source: R/countBamInGranges.R
countBam.everted | R Documentation |
This is a utility function that is called by the higher level count.everted.reads. It processes each BAM file individually to generate the count data.
countBam.everted(bam.file, granges, index = bam.file, min.mapq = 1)
bam.file |
BAM file that needs to be parsed |
granges |
Genomic Ranges object with the location of the bins for which we want to count the everted reads. |
index |
Index for the BAM files. |
min.mapq |
Minimum mapping quality to include reads. |
Most users will not use this function, and it will only be called by the higher level count.everted.reads. Nevertheless it may be useful on its own in some cases.
A list with the number of reads in each bin.
count.everted.reads
data(genes.hg19) bam_file <- system.file('extdata/minimum_1_25630000_25650000.bam', package = 'ExomeDepth') genes.hg19.small <- subset(genes.hg19, grepl(pattern = '^TTC34|^RHD', genes.hg19[['name']])) my_range <- GenomicRanges::GRanges(paste0(genes.hg19.small$chromosome, ":", genes.hg19.small$start, '-', genes.hg19.small$end)) print(my_range) print(countBam.everted (granges = my_range, bam.file = bam_file, min.mapq = 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.