Question: Samtools - huge mpileup file!
0
gravatar for lcc1844
4.3 years ago by
lcc184430
United Kingdom
lcc184430 wrote:

I have a .bam file which contains exome capture data and is 10GB. 

I used the following command to make an mpileup: 

samtools mpileup -E -uf hg19.fa file.art.bam > file.mpileup

It took several hours of making the mpileup file and it got to over 100GB in size and my computer ran out of storage! So i obviously stopped this command running to start again. Why was the pileup so large? 

My intention upon getting the mpileup file was to do variant calling using: 

bcftools view -cg file.mpileup > file.vcf

Are these the right options for me? 

Thank you! 

 

 

alignment next-gen • 2.8k views
ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by lcc184430
3

Use pipe...

ADD REPLYlink written 4.3 years ago by lh331k
1

we're in the pipe five by five:  

https://www.youtube.com/watch?v=fOZk--oZdQk
ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by Istvan Albert ♦♦ 80k

I stopped unzipping the file because my computer ran out of space. I must have done something wrong somewhere because the .vcf should surely be much smaller than fastq and bam! 

 

 

ADD REPLYlink written 4.3 years ago by lcc184430

Pipes are your friend: zcat file.vcf.gz | less.
 

ADD REPLYlink written 4.3 years ago by Devon Ryan90k
1
gravatar for Devon Ryan
4.3 years ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

A pileup file is text-based, so it's going to be large. Assuming you have the most recent version of samtools, just use samtools mpileup -Euvf hg19.fa file.art.bam | bgzip > file.vcf.gz.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Devon Ryan90k

Thanks very much, I ran the command you suggested and it took many hours and generated a zipped .vcf file that is 21GB. Is this not larger that what I could expect from one human exome? 

ADD REPLYlink written 4.3 years ago by lcc184430

It seems rather large to me, but you could just look at the results to see if they make any sense.

ADD REPLYlink written 4.3 years ago by Devon Ryan90k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1442 users visited in the last hour