This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in vg : vg Assertion `reference_for.count(fasta_contig)' failed.

Hello people,

I am a master student in Bioinformatics and this is my first post in Biostars, so please be gentle. :)

I started using vg as part of a project I have for the university, and already got into troubles. I must say here, that i have never used vg before and I am just trying to make it work and learn more about it.

So, I downloaded the version 38 for the human reference genome along with common_all.vcf.gz in order to construct my graph. I created a index file for my VCF file and then i executed the following command:

vg construct -r Homo_sapiens.GRCh38.dna.alt.fa -v 00-common_all.vcf.gz > reference_grap.vg

It runs for a while, trying to create a index file for the reference genome and then it is crashing, giving the following error:

vg: src/constructor.cpp:2095: void vg::Constructor::construct_graph(const std::vector<FastaReference*>&, const std::vector<vcflib::VariantCallFile*>&, const std::vector<FastaReference*>&, std::function<void(vg:$id(vg::Graph&)>): Assertion `reference_for.count(fasta_contig)' failed
  

I tried with different reference genomes and different VCF files (00-All.vcf.gz) but again im getting the same error.

I would appreciate any help regarding this matter,

Thank you, Nikiforos

vg variation graph vgteam

1 answer

Your VCF and reference files are probably using different contig names. If so, you can match them by adding options -n vcf_contig=fasta_contig (e.g. -n chr1=1 -n chr2=2) to the vg construct command.

Log in to answer this question.