Pileup Including All Positions
2
0
Entering edit mode
10.6 years ago

Hi Guys,

I have a SAM file containing my alignment. What I would like to have is a table containing all positions on my chromosome with information about how many reads contain a certain base. The table below might be better to understand what I mean:

CHR | Position | Number of reads that contain an A | Number of reads that contain a T | Number of reads that contain a C | Number of reads that contain a G.

Do you know any tool that would summarise this for me? I have tried it with mpileup but it can't do it.

Many thanks in advance!

mpileup • 3.3k views
ADD COMMENT
1
Entering edit mode
10.6 years ago

Mpileup does exactly what you want. Can you tell us why it won't work? Perhaps a quick perl one liner could fix your problem with mpileup.

EDIT - pileup - not mpileup

EDIT -

samtools pileup dmel.sort.bam > dmel.pileup

ADD COMMENT
0
Entering edit mode

The newest versions of samtools have retired pileup so that function doesn't exist any more (which has caused me to need to update a lot of my variant calling pipelines).

Perhaps this is part of the problem for the user?

ADD REPLY
0
Entering edit mode
10.6 years ago

Really? Hmm, could you perhaps tell me how 1) I can output all positions on the chromosome, not only the snps and 2) where in the output I can find find the number of reads not only covering the base (DP attribute), but also the proportions of each allele? I just can't find it.

ADD COMMENT
2
Entering edit mode

See this http://en.wikipedia.org/wiki/Pileup_format

5th column can be used to get the allele specific depth. All the positions that have at least one read aligned or spanning it should be in the output file depending on the mapping quality threshold and base quality threshold you have chosen. The position with coverage zero wont be displayed in the output.

ADD REPLY
0
Entering edit mode

thank you for the help, very much appreciated

ADD REPLY
0
Entering edit mode

This is a comments so it should be posted using the "comment button." I edited my original post. I should have said pileup not mpileup. This should work.

ADD REPLY
0
Entering edit mode

Sorry, I don't often use forms so I forget sometimes. and thank you for the answer!

ADD REPLY

Login before adding your answer.

Traffic: 2753 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