Question: Failed to open var.raw.bcf: unknown file type
0
gravatar for Ric
2.1 years ago by
Ric330
Australia
Ric330 wrote:

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 • 2.3k views
ADD COMMENTlink modified 2.1 years ago by Pierre Lindenbaum133k • written 2.1 years ago by Ric330

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

ADD REPLYlink written 2.1 years ago by Pierre Lindenbaum133k
0
gravatar for Pierre Lindenbaum
2.1 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

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 COMMENTlink modified 2.1 years ago • written 2.1 years ago by Pierre Lindenbaum133k
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: 1608 users visited in the last hour