bioinformatics-centre / BayesTyper

A method for variant graph genotyping based on exact alignment of k-mers
86 stars 7 forks source link

bayesTyperTools combine Assertion `contig_id_to_idx_it != contig_id_to_idx.end()' failed #5

Closed martinghunt closed 6 years ago

martinghunt commented 6 years ago

I got this error message:

bayesTyperTools: /isdata/kroghgrp/jasi/bayesTyper/code/releases/v1.3.1_static/BayesTyper/src/vcf++/VcfMetaData.cpp:338: uint VcfMetaData::getContigIndex(const string&): Assertion `contig_id_to_idx_it != contig_id_to_idx.end()' failed.
/ebi/lsf/yoda-spool/02/1529441822.3144105: line 8: 29650 Aborted                 (core dumped) /homes/mhunt/bin/bayesTyper_v1.3.1_linux_x86_64/bin/bayesTyperTools combine -v samtools:../samtools.vcf,cortex:../cortex.vcf -o 03.typertools.combine -z

Maybe I'm not using it as intended?

My use case is a bacterium where I have calls for one sample from samtools and cortex, not from GATK/playpus/Manta. I don't have the "variation prior", just calls for that sample from samtools and cortex, hence no prior:<prior>.vcf in my command line.

Can this type of data be used with BayesTyper?

lassemaretty commented 6 years ago

Hi,

Thank you for posting!

Regarding your specific issue:

bayesTyperTools combine requires the header to contain contig (e.g.##contig=<ID=8,length=146364022>) entries for all reference sequences containing variants in the vcf; the contigs further need to appear in the same order in the header and for the variant entries. We have added information about this to the readme.

Generally about running on bacterial genomes:

We have not tested BayesTyper on bacteria. There are no theoretical reasons why it shouldn't work, but please note that:

Please do not hesitate to post again if you further questions or suggestions for how we can improve the BayesTyper support for bacterial data.

br,

Lasse

martinghunt commented 6 years ago

Thank you! I got it working (one of the VCFs didn't have the contig header line)