Learn R Programming

ExomeDepth (version 1.1.16)

countBam.everted: Counts everted reads from a single BAM file

Description

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.

Usage

countBam.everted(bam.file, granges, index = bam.file, min.mapq = 1)

Value

A list with the number of reads in each bin.

Arguments

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.

Details

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.

See Also

count.everted.reads

Examples

Run this code

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))

Run the code above in your browser using DataLab