bioinformatics-centre / BayesTyper

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

Error with bayesTyperTools combine #11

Open stephaniemyan opened 5 years ago

stephaniemyan commented 5 years ago

Hi,

I'm trying to use bayesTyperTools combine to combine two VCF files. When I run the program, I get this error message:

[14/02/2019 15:29:52] You are using BayesTyperTools (v1.4)

[14/02/2019 15:29:52] Running BayesTyperTools (v1.4) combine on 2 files ...

bayesTyperTools: /isdata/kroghgrp/jasi/bayesTyper/code/releases/v1.4_static/BayesTyper-1.4/src/vcf++/Allele.cpp:63: Allele::Allele(const string&): Assertion `_seq.find_first_not_of("ACGTRYSWKMBDHVN") == string::npos' failed.
Aborted

Here's the command I'm using:

bayesTyperTools combine -v sgdp:sgdp_snvs.vcf.gz,gorilla:gorilla_snvs.vcf.gz -o combined.vcf.gz -z

And here are the first 1000 lines of the VCFs for reference: sgdp_snvs_1000.vcf.zip gorilla_snvs_1000.vcf.zip

I'm not sure what's off about the VCF files. Could you tell me what the error message means and how to go about debugging it?

Thanks, Steph

jonassibbesen commented 5 years ago

Hi Steph,

Thank you for writing. This error occurs when either the reference or the alternative allele contains characters that are not part of the IUPAC nucleotide code. I looked through the gorilla vcf you provided and found multiple lines where the alternative allele is missing ('.' character is used):

chr1    904283  .   C   .   96.23   PASS
chr1    904436  .   T   .   2916.03 PASS

BayesTyper does not support sites without an alternative allele. Therefore, try to remove them and run combine again.

Let me know if it does not work.

Best,

Jonas

stephaniemyan commented 5 years ago

Hi Jonas,

Thank you for your prompt response. Removing the '.' alts fixed this error, but now I have a new one:

[15/02/2019 10:12:12] You are using BayesTyperTools (v1.4)

[15/02/2019 10:12:12] Running BayesTyperTools (v1.4) combine on 2 files ...

bayesTyperTools: /isdata/kroghgrp/jasi/bayesTyper/code/releases/v1.4_static/BayesTyper-1.4/src/vcf++/VcfMetaData.cpp:55: uint VcfMetaData::numColumns() const: Assertion `header_added' failed.
Aborted

It looks like it might be an issue with the header now? Do you know how I could fix this one?

Thanks, Steph

jonassibbesen commented 5 years ago

Glad it worked. The new error occurs when the #CHROM row in the header is missing or not correctly formatted. Would it be possible to upload the vcf like before?

Thanks,

Jonas