Description Usage Arguments Value Examples
Get coverage count for positions of interest
1 | getCoverage(gr, bamFile, indexFile, verbose = FALSE)
|
gr |
GenomicRanges object for positions of interest |
bamFile |
bam file |
indexFile |
bai index file |
verbose |
Boolean of whether or not to print progress and info |
totCount Total coverage count information for each position of interest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# Sites of interest (chr1:4600000, chr2:2000)
gr <- GRanges(c('chr1', 'chr2'), IRanges(start=c(4600000, 2000), width=1))
# we can get the coverage at these SNP sites from our bams
path <- '../data-raw/bams/'
files <- list.files(path = path)
files <- files[grepl('.bam$', files)]
cov <- do.call(cbind, lapply(files, function(f) {
bamFile <- paste0(path, f)
indexFile <- paste0(path, paste0(f, '.bai'))
getCoverage(gr, bamFile, indexFile)
}))
colnames(cov) <- files
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.