Hi I have used the below command line to call SNPs: samtools-1.2/samtools mpileup -q 25 -Iu -f reference.fasta .*.sorted.bam | bcftools view -Nv - | vcfutils.pl varFilter -Q 20 - >multicall.vcf
but it gives the following error:
[mpileup] 20 samples in 20 input files [bcf_sync] incorrect number of fields (0 != 5) at 0:0 [afs] 0:0.000
and the vcf file it generated only has the headers
Please give any suggestions which will help a lot!! I have been stuck on this for so long...
Thank you so much!! I tried it, it works!! but the generated .vcf file has some problems (all "<x>" in "ALT" column, all "0" in "QUAL" column, all "." in "Filter" column). Besides, it also says "[mpileup] 1 samples in 1 input files", of which I do not know whether it is an error or not.
The "[mpileup]..." thing is just informational. You'll need to use
bcftools call
in addition tobcftools view
.Thanks a lot! (the commands were given by a senior who no longer works in our lab, I didn't know bcftools call should be used in newer version for samtools mpileup output). I generated a better .vcf file using bcftools call instead of bcftools view, however the "ID" and "FILTER" column is still "."
The command I am using now is: samtools-1.2/samtools mpileup -d 8000 -q 25 -Iu -f reference.fasta *.sorted.bam | bcftools-1.2/bcftools call -m | bcftools-1.2/vcfutils.pl varFilter -Q 20 - > multivariantcall.vcf &