Skip to content

bcftools view could not parse the header / invalid contig name #2538

@CaroZ655

Description

@CaroZ655

Hello,
I am trying call variants in a fungal genome. I have assembled the genome and merged my assembly to the existing assembly on Genebank (with Quikmerge).
I have then used Freebayes to generate the snps.vcf, then bgzipped the vcfs with Samtools, and then run Tabix.
When I try to run

module load BCFtools/1.21-GCC-13.3.0

while IFS= read -r i;
 do bcftools view -t ${SLURM_CPUS_PER_TASK} -i 'FMT/GT="1/1" && QUAL>=100 && FMT/DP>=10 && (FMT/AO)/(FMT/DP)>=0' /path/variants_filtering_annotation/${i}_snps_quickmerge.vcf.gz > /path/variants_filtering_annotation/${i}_quickmerge_filtered_snps.vcf.gz
done < "/path/M17_libs.txt"

I get in my .out file :

[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089422.1_Metarhizium_brunneum_chromosome_1,_complete_sequence,length=9557205>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089423.1_Metarhizium_brunneum_chromosome_2,_complete_sequence,length=7414246>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089428.1_Metarhizium_brunneum_chromosome_7,_complete_sequence,length=2793940>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089427.1_Metarhizium_brunneum_chromosome_6,_complete_sequence,length=4124785>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089425.1_Metarhizium_brunneum_chromosome_4,_complete_sequence,length=4578647>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089424.1_Metarhizium_brunneum_chromosome_3,_complete_sequence,length=4701664>"
[E::bcf_hdr_parse_line] Could not parse the header line: "##contig=<ID=NC_089426.1_Metarhizium_brunneum_chromosome_5,_complete_sequence,length=4217701>"
[W::bcf_hrec_check] Invalid contig name: "NC_089422.1_Metarhizium_brunneum_chromosome_1,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089423.1_Metarhizium_brunneum_chromosome_2,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089428.1_Metarhizium_brunneum_chromosome_7,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089427.1_Metarhizium_brunneum_chromosome_6,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089425.1_Metarhizium_brunneum_chromosome_4,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089424.1_Metarhizium_brunneum_chromosome_3,_complete_sequence"
[W::bcf_hrec_check] Invalid contig name: "NC_089426.1_Metarhizium_brunneum_chromosome_5,_complete_sequence"

Is it something I have done wrong, or is it common ? Is there a way to work around this ?
Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions