vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.07k stars 191 forks source link

error vg autoindex: Input is not sufficient to create indexes #4228

Closed MarionPerrier closed 4 months ago

MarionPerrier commented 4 months ago

1. What were you trying to do? I was trying to use vg autoindex to index my pangenome graph for mpmap and rpvg. I have build the pangenome using PGGB on the pangenome pipeline of nf-core.

2. What did you want to happen? A full completion of the program

3. What actually happened?

[IndexRegistry]: Checking for haplotype lines in GFA.
error:[vg autoindex] Input is not sufficient to create indexes
Inputs
        Haplotype GTF/GFF
        Reference GFA w/ Haplotypes
are insufficient to create target index Haplotype-Transcript GBWT

4. If you got a line like Stack trace path: /somewhere/on/your/computer/stacktrace.txt, please copy-paste the contents of that file here:

NA

5. What data and command can the vg dev team use to make the problem happen? Here is my command:

vg autoindex -w mpmap -w rpvg -p 20240221_pg_index -g ../nf_pangenome_results/results4/smoothxg/final_v1.1.gfa -H ../gff_prefixed/ref1_prefix.gff3 -H ../gff_prefixed/ref2_prefix.gff3 -H ../gff_prefixed/ref3_prefix.gff3 -H ../gff_prefixed/ref4_prefix.gff3 -H ../gff_prefixed/sample1_prefix.gff3 -H ../gff_prefixed/sample2_prefix.gff3 -H ../gff_prefixed/sample3_prefix.gff3 -H ../gff_prefixed/sample4_prefix.gff3 -H ../gff_prefixed/sample5_prefix.gff3 -H ../gff_prefixed/sample6_prefix.gff3 -H ../gff_prefixed/sample7_prefix.gff3 -H ../gff_prefixed/sample8_prefix.gff3 -H ../gff_prefixed/sample9_prefix.gff3 -H ../gff_prefixed/sample10_prefix.gff3 -H ../gff_prefixed/sample11_prefix.gff3 --gff-tx-tag Parent -t 8

6. What does running vg version say?

vg version v1.54.0 "Parafada"
Compiled with g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 on Linux
Linked against libstd++ 20230528
Built by xian@octo

I am running vg on a HPC (slurm) directly in command line from a node. VG has been installed with conda. When I use the docker image, the error message is always the same: error:[IndexRegistry] Could not open GFA file ../nf_pangenome_results/results4/smoothxg/final_v1.1.gfa

jeizenga commented 4 months ago

As is, vg autoindex expects at least one of the GTFs to be provided as a "reference GTF" (-x) rather than a "haplotype GTF" (-H). It wouldn't be too hard to relax this restriction, but designating one as a reference might be enough to unblock you on the insufficient input error.

On the "Could not open GFA" error, that typically occurs when there's a typo in the file path, a missing file, or a permissions issue for the file. It looks to me like this error was thrown the first time vg tried to access any file. Perhaps your docker has some issues with its file mounts?

MarionPerrier commented 4 months ago

Oh ok! Makes sense 😅. It works very smoothly now. Thank you!