mikolmogorov / Ragout

Chromosome-level scaffolding using multiple references
Other
146 stars 27 forks source link

AttributeError: 'Graph' object has no attribute 'node' #69

Closed damioresegun closed 3 years ago

damioresegun commented 3 years ago

I had previously run ragout with the exact same data in the same conda environment and it worked perfectly well/ However a second run has generate the above error.

Here is the transcript of my logfile: " ragout /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//Recipes/sks047_check.rcp -o /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047 --refine --repeats -t 32 [17:29:39] INFO: Starting Ragout v2.3 [17:29:39] INFO: Running withs synteny block sizes '[5000, 500, 100]' [17:29:39] INFO: Running Sibelia with block size 5000 [14:27:15] INFO: Running Sibelia with block size 500 [12:29:27] INFO: Running Sibelia with block size 100 [11:42:01] INFO: Inferring phylogeny from synteny blocks data [11:42:01] INFO: Reading /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047/sibelia-workdir/100/blocks_coords.txt [11:42:01] INFO: "Pknowlesi_contigs" synteny blocks coverage: 87.01% [11:42:01] INFO: "sks047" synteny blocks coverage: 89.16% [11:42:02] INFO: Inferred tree: ('Pknowlesi_contigs' : 133.5, 'sks047' : 133.5) [11:42:02] INFO: 'Pknowlesi_contigs' is chosen as a naming reference [11:42:02] INFO: Processing permutation files [11:42:02] INFO: Reading /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047/sibelia-workdir/5000/blocks_coords.txt [11:42:02] INFO: "Pknowlesi_contigs" synteny blocks coverage: 77.52% [11:42:02] INFO: "sks047" synteny blocks coverage: 80.37% [11:42:02] INFO: Reading /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047/sibelia-workdir/500/blocks_coords.txt [11:42:02] INFO: "Pknowlesi_contigs" synteny blocks coverage: 87.22% [11:42:02] INFO: "sks047" synteny blocks coverage: 89.51% [11:42:02] INFO: Reading /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047/sibelia-workdir/100/blocks_coords.txt [11:42:02] INFO: "Pknowlesi_contigs" synteny blocks coverage: 87.01% [11:42:02] INFO: "sks047" synteny blocks coverage: 89.16% [11:42:03] INFO: Reading /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/RagOuting//sks047/sibelia-workdir/100/blocks_coords.txt [11:42:03] INFO: "Pknowlesi_contigs" synteny blocks coverage: 87.01% [11:42:03] INFO: "sks047" synteny blocks coverage: 89.16% [11:42:03] INFO: Resolving repeats Traceback (most recent call last): File "/shelf/apps/dro/conda/envs/ragout/bin/ragout", line 33, in sys.exit(load_entry_point('ragout==2.3', 'console_scripts', 'ragout')()) File "/shelf/apps/dro/conda/envs/ragout/lib/python3.8/site-packages/ragout/main.py", line 295, in main _run_ragout(args) File "/shelf/apps/dro/conda/envs/ragout/lib/python3.8/site-packages/ragout/main.py", line 191, in _run_ragout stage_perms[stage] = PermutationContainer(perm_files[stage.block_size], File "/shelf/apps/dro/conda/envs/ragout/lib/python3.8/site-packages/ragout/breakpoint_graph/permutation.py", line 85, in init rr.resolve_repeats(self.ref_perms, self.target_perms, File "/shelf/apps/dro/conda/envs/ragout/lib/python3.8/site-packages/ragout/breakpoint_graph/repeat_resolver.py", line 84, in resolve_repeats unique_m, repetitive_m = _match_target_contexts(profiles, File "/shelf/apps/dro/conda/envs/ragout/lib/python3.8/site-packages/ragout/breakpoint_graph/repeat_resolver.py", line 254, in _match_target_contexts if graph.node[genome_node]["profile"]: AttributeError: 'Graph' object has no attribute 'node' "

The recipe file looks like this:

reference and target genome names (required)

.references = Pknowlesi_contigs .target = sks047

paths to genome fasta files (required for Sibelia)

Pknowlesi_contigs.fasta = /storage/home/users/dro/Index/Jan2020_PainReference/Pknowlesi_contigs.fasta sks047.fasta = /storage/home/users/dro/PipelineAnalyses/Nu_Nu_Analysis/MaskedAssemblies/sks047_masked.fasta

Any ideas?

mikolmogorov commented 3 years ago

This is likely a result of networkx versions incompatibilities. Ragout currently works with networkx 2.2, and you seems to have networkx 2.4+ installed. Bioconda package requires networkx 2.2, but it is possible that you have a different networkx version installed in your system, and it interferes.

I suggest to check with networkx versions are available in your python environment you are using for Ragout. A clean install in a new environment might solve the problem