samtools mpileup output only contains vcf header
2
1
Entering edit mode
6.0 years ago
s102060125 ▴ 10

Hi, I tried to call variant for creating consensus sequence with the following command:

samtools mpileup -C50 -uf $ref_genome $sorted.bam > output.mpileup

but the output contains vcf headers only, no variant was called, and no error message shown. The input bam file was produced by 'bwa mem', with default setting, and was sorted and indexed. The reference genome was also indexed. The commands works properly with a test data I downloaded from SRA. So I really don't know what went wrong. Also I can call variant from my bam file using GATK, so there must be variants presented in my sample. samtools version is 1.7, bwa version is 0.7.1

Thanks!!

variant calling mpileup samtools • 1.8k views
ADD COMMENT
2
Entering edit mode
6.0 years ago

the output is not a VCF file but a BCF (binary VCF file), that is why you won't see anything but the header.

$ file output.mpileup
output.mpileup: data

$ file regular.vcf
regular.vcf: ASCII text, with very long lines

you'll need to convert the BCF to VCF with bcftools view

ADD COMMENT
0
Entering edit mode

I may not make my point clear. There's nothing under the headers in my mpileup output, not even binary stuff. It's different from the test output I generate with the same command but using SRA data. Also, my 'output.mpileup' didn't return anything but vcf header in the downstream command 'bcftools call', while my test data worked fine.

ADD REPLY
0
Entering edit mode

ok, I see

ADD REPLY
0
Entering edit mode
6.0 years ago

I wonder if the issue is with the chromosome naming...maybe there is a discrepancy between the bam and the ref that GATK can handle, but samtools cannot.

ADD COMMENT

Login before adding your answer.

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