Samtools mpileup returns empty vcf file
1
0
Entering edit mode
5.9 years ago

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.

samtools mpileup • 1.9k views
ADD COMMENT
0
Entering edit mode
5.9 years ago
Ram 43k

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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