Entering edit mode
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!
Just out of curiosity, what is it that you are going to do with the pileup after you have it?
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.
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....