bcftools
bcftools copied to clipboard
bcftools consensus error: No such sample
Hi,
I'm running consensus with the following code:
bcftools consensus -f int.fa -H 1 -s H1 haplotype.vcf.gz > id1.fa
The input haplotype.vcf is like
##fileformat=VCFv4.2 #CHROM POS ID REF ALT QUAL FILTER INFO H1 H2 H3 .... H999 chr21 44674498 rs587635126 C T . . . 0 0 0...0 chr21 44674535 rs117434156 G A . . . 0 0 0...0
and I got the error
No such sample: H1
Do you have any idea about this issue? Thanks in advance for your help.
Most likely the VCF is not well formatted, with the latest version an informative error message should be printed. Which version of bcftools are you using? Try if the sample selection works in other commands work, for example bcftools view -s H1 file.vcf