Failed to open var.raw.bcf: unknown file type
Hi, I used the following commands to call SNPs
samtools merge ${1}/all.sorted.dedup.bam ${1}/*.sorted.dedup.bam
samtools index ${1}/all.sorted.dedup.bam
samtools faidx $2
samtools mpileup -uf $2 ${1}/all.sorted.dedup.bam | bcftools view -bvcg - > var.raw.bcf
bcftools view var.raw.bcf | vcfutils.pl varFilter -D100 > var.flt.vcf
but unfortunately, I got the following error:
[warning] samtools mpileup option `u` is functional, but deprecated. Please switch to using bcftools mpileup in future.
[mpileup] 4 samples in 1 input files
view: invalid option -- 'b'
About: VCF/BCF conversion, view, subset and filter VCF/BCF files.
Usage: bcftools view [options] <in.vcf.gz> [region1 [...]]
...
Failed to open var.raw.bcf: unknown file type
What did I miss?
Thank you in advance,
• 4,979 views
•
link
1 answer
the message is quite clear.
view: invalid option -- 'b'
there is no 'b' option in bcftools view https://samtools.github.io/bcftools/bcftools.html#view
use option -O to generate bcf
• 0 views
•
link
Log in to answer this question.
did you read the comments for your previous question ? samtools mpileup to bcftools mpileup