katerinakazantseva / strainy

Graph-based assembly phasing
Other
65 stars 5 forks source link

gfapy.error.NotFoundError #70

Closed mallen6 closed 1 year ago

mallen6 commented 1 year ago

Hello, I would like to use stRainy on my nanopore metagenomic assembly, but am getting an error.

I first ran flye v2.9.1 with the recommended parameters: flye --nano-raw barcode16_pool.fastq.gz --meta --threads 12 --out-dir stRainy/ --keep-haplotypes --no-alt-contigs -i 0

and then ran stRainy with the command: ./strainy.py -g assembly_graph.gfa -q barcode16_pool.fastq.gz -m nano -o stRainy_results/ -f assembly.fasta -t 12

The error I get is Traceback (most recent call last): File "/home/z2194795/stRainy/strainy.py", line 87, in main() File "/home/z2194795/stRainy/strainy.py", line 56, in main input_graph = gfapy.Gfa.from_file(args.gfa) File "/srv/scratch/z2194795/miniconda3/envs/strainy/lib/python3.10/site-packages/gfapy/gfa.py", line 235, in from_file gfa.read_file(filename) File "/srv/scratch/z2194795/miniconda3/envs/strainy/lib/python3.10/site-packages/gfapy/gfa.py", line 218, in read_file self.validate() File "/srv/scratch/z2194795/miniconda3/envs/strainy/lib/python3.10/site-packages/gfapy/gfa.py", line 121, in validate self.validate_path_links() File "/srv/scratch/z2194795/miniconda3/envs/strainy/lib/python3.10/site-packages/gfapy/gfa.py", line 281, in validate_path_links raise gfapy.NotFoundError("A link equivalent to:\n{}\n".format(\ gfapy.error.NotFoundError: A link equivalent to: L edge_1464 - edge_502 + does not exist, but is required by the following paths: P contig_322 edge_1464-,edge_502+,edge_502+,edge_502+,edge_322+

Do have any suggestions for how I can fix this? I did the conda install of stRainy which installed gfapy v1.2.3 (pyhdfd78af_0 from bioconda)

Best regards, M

katerinakazantseva commented 1 year ago

Hello, It seems you used the fasta file from the output of flye, but this file contains different names than gfa ("contig" vs "edge"). I would recommend you to run stRainy without -f parameter, in this case it will be created automatically from your gfa file.

mallen6 commented 1 year ago

Thanks! I'm not getting the error any more