Rsamtools PileupParam set minimum depth to zero
0
0
Entering edit mode
komal.rathi ▴ 120
@komalrathi-9163
Last seen 14 months ago
United States

Hello everyone,

I am using the Rsamtools pileupparam like this:

p_param <- PileupParam(distinguish_strand = TRUE,
                           distinguish_nucleotides = TRUE,
                           min_nucleotide_depth = 0)

I was hoping to get a pileup output even where there is no coverage because I have set the min_nucleotide_depth to 0. However, when I have a position for which there is no coverage, pileup does not return anything. Is there a workaround for that?

Thanks!

rsamtools pileup • 1.6k views
ADD COMMENT
0
Entering edit mode

Just out of curiosity, what is it that you are going to do with the pileup after you have it?  

ADD REPLY
0
Entering edit mode

So I modify the pileup to get a table of Chr, Pos, Ref, Depth, A, T, G and Cs. So right now my script gives me nucleotide frequencies for all the positions where there is a read, but does not give information about the positions that have no read associated with it. I am writing this script for a postdoc in my lab who wants that information as well.

ADD REPLY
0
Entering edit mode

I'm still not clear why lack of information at sites that have no information is a problem.  However, if you really need the zeros for everything, you can probably call gaps() on your pileup output and then fill in the zeros after the pileup returns.  This will result in a potentially large increase in memory usage....

ADD REPLY

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6