Failed to open var.raw.bcf: unknown file type
1
0
Entering edit mode
5.3 years ago
Ric ▴ 430

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,

snp • 4.1k views
ADD COMMENT
0
Entering edit mode

did you read the comments for your previous question ? samtools mpileup to bcftools mpileup

ADD REPLY
0
Entering edit mode
5.3 years ago

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

ADD COMMENT

Login before adding your answer.

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