I have been trying to call variants using bcftools call
after installing it as instructed here.
The problem is that I am not getting any calls in the output vcf (it contains only the header).
My bam files were aligned with bwa-mem
and processed with GATK pipeline. They have worked well with muTect and VarScan.
I have tried many parameter combinations e.g. -DgB
, for mpileup and -mv
for bcftools, in vain.
The versions I am using are samtools 0.2.0-rc7-54-ge35361b and bcftools 0.2.0-rc7-13-gca1a8b5
Does anyone know what the problem might be?
An example commandline I used is below:
samtools mpileup -u -f ref.fa -b sampleList | bcftools call -cv - > output.vcf
Without looking at things further, keep in mind that you're using a development version, so should presumably be reporting things back to the developers. You might get more stable results with the current release.
I think the problem is with bcftools since samtools mpileup looks fine to me. When I used the current release of bcftools, I got the error "invalid BCF2 magic string" which this link says was fixed in recent commits so that's why I tried the development version.
What happens if you drop -v? Could the simple explanation be that there are no non-reference calls?
I tried without
-v
too but that didn't help either. It would be helpful to know which versions of samtools, htslib and bcftools are compatible since I've had a hard time figuring this out. Thanks!This does not seem to be a samtools/htslib/bcftools compatibility problem, as you say you followed instructions from here http://samtools.github.io/bcftools/. If you run mpileup with -uv, it will produce raw VCF output. Are any sites listed?
I used -uv on mpileup as you suggested and only -c on bcftools call and still got no sites listed.
I meant if you could run without bcftools at all like this:
samtools mpileup -uv -f ref.fa -b sampleList | less
. Are there any sites listed? If not, then there is something odd with your BAMs. Could all reads be excluded because of low quality for example? Is the result any different with -B,-x,-Q0?Yes, I see sites listed with just mpileup. The problem seems to be with bcftools.
Can you please provide a sample of mpileup -uv output for testing?
I share tayebwajb issues and cannot have bcftools call to work on samtools mpileup data. I have samtools and bcftools/htslib fresh installed and also get the complain about BCF2.
while my samtools pileup seems OK
A full example command would be great with data we can download somewhere to test our executables. Any help most welcome
Stephane
Almost there (thanks pd3 for pointing the git branch error of mine)
Now I still have an issue building razip, likely a mac OSX maverick specific option missing in the makefile
Thanks for help on this!
Hi Stephane,
I have the same problem with bcftools not recognizing mpileup output and reporting the same "invalid BCF2 magic string" error. I have updated all versions of samtools, bcftools and htslib but still the same error
Have you managed to get over this issue?
Thank you!
Sahar