Hi there,
Newbie to the bioinformatic area and looking for some help.
I'm trying to use bcftools to do some SNPs calling from a bcf file created out of samtools mpileup.
In a lot of posts I see the bcftools view options as -bvcg, but when I try it I get the error
bcftools: unknown option -- b
In reading I see that bcftools have changed their view options with the more recent versions (I'm running 1.2), so was wondering if any one can translate the old options into what to use for the new options values. I'm trying :-
-O b -v snps -g het
but since I have never used bcftools before I don't know if that would get me the same output.
Thanks for your assistance in advance.
Eddie
1 answer
For anybody else arriving at this thread:
# 1, call variants
bcftools mpileup --redo-BAQ --min-BQ 30 --per-sample-mF \
--output-tags DP,AD \
--annotate FORMAT/AD,FORMAT/ADF,FORMAT/ADR,FORMAT/DP,FORMAT/SP,INFO/AD,INFO/ADF,INFO/ADR \
-f "${Ref_FASTA}" \
--BCF "${repBAM1}" "${repBAM2}" "${repBAM3}" "${repBAM4}" | \
bcftools call --multiallelic-caller --variants-only -Ob > out.bcf ;
#2, filter the variants further
#Options:
# -Q INT minimum RMS mapping quality for SNPs [10]
# -d INT minimum read depth [2]
# -D INT maximum read depth [10000000]
# -a INT minimum number of alternate bases [2]
# -w INT SNP within INT bp around a gap to be filtered [3]
# -W INT window size for filtering adjacent gaps [10]
# -1 FLOAT min P-value for strand bias (given PV4) [0.0001]
# -2 FLOAT min P-value for baseQ bias [1e-100]
# -3 FLOAT min P-value for mapQ bias [0]
# -4 FLOAT min P-value for end distance bias [0.0001]
# -e FLOAT min P-value for HWE (plus F<0) [0.0001]
# -p print filtered variants
bcftools view -Ov out.bcf | misc/vcfutils.pl varFilter -d 18 -w 1 -W 3 -a 1 \
-1 0.05 -2 0.05 -3 0.05 -4 0.05 \
-e 0.05 -p > out.filt.vcf ;
misc/vcfutils.pl should come bundled with BCFtools.
You can then add further tags to the VCF/BCF by following this: How to use bcftools to calculate AF INFO field from AC and AN in VCF?
Kevin
Log in to answer this question.
Hi!
There is no
-boption in the bcftools manual.-O b(in your second command line) means to get output as a compressed BCF file.To do SNP calling, I usually use the command line:
Thanks for the reply. I will give bcftools call a try.
Yes, I was trying to use the command
bcftools view -bvcg ..., but it seem those were the valid options for an older version of bcftools.I found this list of options for bcftools view (an old version, which explained the
-bvcgto me):but the version 1.2 bcftools view options are :
So just trying to find the new options variable that will get me the same output.
Hi Evgeniia,
Gave bcftools call a try and it worked for me.
Thanks for your help.
Eddie
You are welcome! :)