This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Genome Coverage Using RSamTools

Hi guys,

Currently, I've used this manual (https://kasperdanielhansen.github.io/genbioconductor/html/Rsamtools.html) to load in my BAM file. I've gotten to the part where I'm given a list of qname, flag, etc for my very first read. On the original C samtools, there is a function called coverage that I want to do, but I am having trouble finding the code/argument to perform the same thing in Rsamtools. Any tips/links/code would be appreciated.

Thanks

rsamtools coverage

Are you sure you want to use Rsamtools to find coverage? The GenomicRanges library has a coverage function. If you've read in your bam file, you can convert it to a GRanges object and hand it to coverage:

aln <- as(aln,'GRanges')
cov <- coverage(aln)

0 answers

No answers yet.

Log in to answer this question.