Question: samtools mpileup output only contains vcf header
1
gravatar for s102060125
13 months ago by
s10206012510
s10206012510 wrote:

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!!

ADD COMMENTlink modified 13 months ago by swbarnes25.8k • written 13 months ago by s10206012510
2
gravatar for Pierre Lindenbaum
13 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

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 COMMENTlink modified 13 months ago • written 13 months ago by Pierre Lindenbaum120k

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 REPLYlink modified 13 months ago • written 13 months ago by s10206012510

ok, I see

ADD REPLYlink written 13 months ago by Pierre Lindenbaum120k
0
gravatar for swbarnes2
13 months ago by
swbarnes25.8k
United States
swbarnes25.8k wrote:

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 COMMENTlink written 13 months ago by swbarnes25.8k
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: 1268 users visited in the last hour