mikolmogorov / Ragout

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

TypeError: 'instancemethod' object is not iterable #44

Closed lac2208 closed 5 years ago

lac2208 commented 5 years ago

Hello, I'm running ragout on a PBS cluster. I first tried running it across 64 nodes, and got the error below. I tried changing to 1 single node, but the error keeps showing up. Does anyone know how to move past this? Thank you

12:34:17] INFO: Starting Ragout v2.2 [12:34:17] INFO: Running withs synteny block sizes '[10000, 500, 100]' [12:34:17] WARNING: Using synteny blocks from previous run [12:34:17] WARNING: Use --overwrite to force alignment [12:34:17] INFO: Inferring phylogeny from synteny blocks data [12:34:17] INFO: Reading /array1/lcoelho/genomes/ragout/ragout/hal-workdir/100/blocks_coords.txt [12:34:25] INFO: "passer" synteny blocks coverage: 88.94% [12:34:25] INFO: "tae" synteny blocks coverage: 88.36% [12:34:25] INFO: "parus" synteny blocks coverage: 88.82% [12:34:25] INFO: "rhegma" synteny blocks coverage: 93.27% [12:34:26] INFO: "ficedula" synteny blocks coverage: 87.21% [12:35:14] INFO: Inferred tree: (('parus' : 12988.0, ('ficedula' : 18170.3333333, 'rhegma' : 1e-06) : 1794.0) : 654.0, ('passer' : 15403.0, 'tae' : 17501.0) : 654.0) [12:35:14] INFO: 'parus' is chosen as a naming reference [12:35:14] INFO: Processing permutation files [12:35:14] INFO: Reading /array1/lcoelho/genomes/ragout/ragout/hal-workdir/10000/blocks_coords.txt [12:35:14] INFO: "passer" synteny blocks coverage: 92.25% [12:35:14] INFO: "tae" synteny blocks coverage: 91.21% [12:35:14] INFO: "parus" synteny blocks coverage: 91.98% [12:35:14] INFO: "rhegma" synteny blocks coverage: 96.3% [12:35:14] INFO: "ficedula" synteny blocks coverage: 91.18% [12:35:15] INFO: Reading /array1/lcoelho/genomes/ragout/ragout/hal-workdir/500/blocks_coords.txt [12:35:17] INFO: "passer" synteny blocks coverage: 91.8% [12:35:17] INFO: "tae" synteny blocks coverage: 90.97% [12:35:17] INFO: "parus" synteny blocks coverage: 91.6% [12:35:17] INFO: "rhegma" synteny blocks coverage: 95.9% [12:35:17] INFO: "ficedula" synteny blocks coverage: 90.23% [12:35:27] INFO: Reading /array1/lcoelho/genomes/ragout/ragout/hal-workdir/100/blocks_coords.txt [12:35:34] INFO: "passer" synteny blocks coverage: 88.94% [12:35:35] INFO: "tae" synteny blocks coverage: 88.36% [12:35:35] INFO: "parus" synteny blocks coverage: 88.82% [12:35:35] INFO: "rhegma" synteny blocks coverage: 93.27% [12:35:35] INFO: "ficedula" synteny blocks coverage: 87.21% [12:36:09] INFO: Reading /array1/lcoelho/genomes/ragout/ragout/hal-workdir/100/blocks_coords.txt [12:36:17] INFO: "passer" synteny blocks coverage: 88.94% [12:36:17] INFO: "tae" synteny blocks coverage: 88.36% [12:36:17] INFO: "parus" synteny blocks coverage: 88.82% [12:36:17] INFO: "rhegma" synteny blocks coverage: 93.27% [12:36:17] INFO: "ficedula" synteny blocks coverage: 87.21% [12:36:57] INFO: Reading contigs file [12:37:10] INFO: Stage "10000" [12:37:10] INFO: Inferring missing adjacencies Traceback (most recent call last): File "/home/lcoelho/Ragout/bin/ragout", line 32, in sys.exit(main()) File "/home/lcoelho/Ragout/ragout/main.py", line 290, in main _run_ragout(args) File "/home/lcoelho/Ragout/ragout/main.py", line 214, in _run_ragout adjacencies = adj_inferer.infer_adjacencies() File "/home/lcoelho/Ragout/ragout/breakpoint_graph/inferer.py", line 44, in infer_adjacencies chosen_edges.extend(self._process_component(subgraph)) File "/home/lcoelho/Ragout/ragout/breakpoint_graph/inferer.py", line 77, in _process_component adjacency = subgraph.to_weighted_graph(self.phylogeny) File "/home/lcoelho/Ragout/ragout/breakpoint_graph/breakpoint_graph.py", line 104, in to_weighted_graph g.add_nodes_from(self.bp_graph.nodes) File "/home/lcoelho/array1/miniconda2/lib/python2.7/site-packages/networkx/classes/graph.py", line 511, in add_nodes_from for n in nodes: TypeError: 'instancemethod' object is not iterable

mikolmogorov commented 5 years ago

Hi,

It is likely an inconsistency between the networkx versions. The latest Ragout now requires networkx 2.2. Are you using the bioconda package? If you do the manual system installation, did you run pip install -r requirements.txt --user?

Mikhail

lac2208 commented 5 years ago

Thanks Mikhail.

That was in fact the problem. I tried installing with bioconda and it didn't work. I later installed Ragout and and updated networks (conda install --upgrade) manually and it worked.

mikolmogorov commented 5 years ago

Thanks!