This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to reconstruct reads or bam file from pileup

Hi !

I made bam file and pileup file by using samtools, and I deleted this bam file because of its size. However, I found that I need to get some information about my data such as number of reads.

Therefore, I want to ask

(1) Can I reconstruct fastq or bam file from pileup file?

or

(2) Can I get some information related to mapped reads data from pileup file?

Thanks !

alignment bam mpileup samtools

1 answer

No you can't recontruct the fastq or bam from the pileup file, as each mapped read is shredded into one base per reference position.

But yes, you can get some information, such as coverage per reference position, proportion and number of each base at each reference position, and proportion and number of quality scores at each reference position.

Thanks h.mon!

See if I can get what I want, and if it doesn't work, I redo from row data.

Thank you!

Log in to answer this question.