Question: Samtools mpileup returns empty vcf file
gravatar for shreyasibiswas88
2.3 years ago by
United States
shreyasibiswas8830 wrote:

Hello everyone,

I am using samtools mpileup on multi bam files to genrate vcf file. mpileup seems to be working with only 6 bam files but not on more than 6 files. If I enter more than 6 files, samtools finishes without error in approx 2min and the vcf file generated is empty except for the header. I have used this command line in the past to call vcf from as many as 10 bam files. Now I need to increase it to 58 bam files. But it is failing if I include more than 6 bam files.

the command line I am using

/home/sb47/Programs/samtools-1.3.1/samtools mpileup -uv \
    -l /scratch/sb47cp/global_seq_Rnorvegicus/858_positions \
    -f /scratch/sb47cp/Ref_5_71/Rattus_norvegicus.Rnor_5.0.71.dna_sm.toplevel.fa \
    -b bams.list  |  /home/sb47/Programs/samtools-1.3.1/bcftools-1.3.1/bcftools call -c \
    > /scratch/sb47cp/FranceIce_858loci.vcf

bams.list is the list of bam files.

Can anyone please help me with this? I unable to figure out why it is not working.

mpileup samtools • 931 views
ADD COMMENTlink modified 2.3 years ago by RamRS30k • written 2.3 years ago by shreyasibiswas8830
gravatar for RamRS
2.3 years ago by
Baylor College of Medicine, Houston, TX
RamRS30k wrote:

From a first glance, I can see that the bcftools command is not proper. When input is stdin (being piped in from a previous command), you need the stdin indicator - as specified in the specs:

BCFtools is designed to work on a stream. It regards an input file "-" as the standard input (stdin) and outputs to the standard output (stdout). Several commands can thus be combined with Unix pipes.

Your bcftools command should be: bcftools call -c - >out_file.vcf

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by RamRS30k

Thank you for your response. I followed your suggestion. Unfortunately it still doesn't work. i have successfully used the above command in the past without the - as suggested by you in generating vcf from 10 bam files.

ADD REPLYlink written 2.3 years ago by shreyasibiswas8830

That is strange. Maybe check out the bams.list to ensure line endings are fine and the BAM files exist at the right locations?

ADD REPLYlink written 2.3 years ago by RamRS30k

I have checked and re-checked without any success. It is bizarre to me as it has worked in the past. I have written to the authors too. But haven't heard anything back. Thank you for your suggestions.

ADD REPLYlink written 2.2 years ago by shreyasibiswas8830
Please log in to add an answer.


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