Thanks! But the problem is that mpileup filter data. I just want to see raw data from BAM , like samtools tview.
• 0 views
•
link
How can I print only 1 column from a BAM file at specific coordinate.
For example:
ACGTGACGGACGGGGCCA
TGACGGACGGGGCCA
GGACGGGGCCA
^
For example print the column at coord 'x' will return AAA (see example above)
Maybe something like this?
/package/samtools/samtools mpileup ./your.bam | cut -f 1,2,5
That will give you a chromosome, base position (1-based) and a string similar to what you're looking for, but is case sensitive (strand) and has some other symbols for mismatches, etc.
Check out: http://samtools.sourceforge.net/pileup.shtml
Log in to answer this question.