bcftools consensus still returns "Could not parse the header" error

0

I attempted to create a consensus fasta file using bcftools, i.e.

bgzip -c All_SRR_SNP_Clean.vcf > All_SRR_SNP_Clean.vcf.gz
tabix All_SRR_SNP_Clean.vcf.gz
cat $ref| bcftools consensus $vcf_dir/All_SRR_SNP_Clean.vcf.gz > consensus.fasta

where $ref is the path to a Drosophila reference genome fa and the vcf was generated from an mpileup combining 4 different poolseq samples.

I get a parse error message:

[W::bcf_hdr_register_hrec] The type "FLoat" is not supported, assuming "String"
[W::bcf_hdr_parse] Could not parse header line: #CHROM       POS       ID            REF       ALT       QUAL       FILTER       INFO       FORMAT        SRR5647735.1.realign.bam  SRR8439151.1.realign.bam    SRR8439156.1.realign.bam
[E::bcf_hdr_parse] Could not parse the header, sample line not found
Failed to read from /home/mshpak/Lundflies/bams/unsorted/round1   /VCF/Three_Files/All_SRR_SNP_Clean.vcf.gz: could not parse header

Several threads from 2-3 years ago referenced similar errors using bcftools, e.g.

Probable bug in bcftools while parsing headers

but they don't indicate a satisfactory resolution. As I have the most recent version of bcftools, it doesn't seem like the problem has been corrected, so is there a patch or work-around available?


bcftools


samtools

• 19 views



Source link