mikolmogorov / Ragout

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

AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs' #63

Closed drashwinelkar closed 4 years ago

drashwinelkar commented 4 years ago

I am using Ragout 2.3 and I get this error [12:58:39] INFO: Reading ./sibelia-workdir/100/blocks_coords.txt [12:58:39] INFO: "ctet_harv" synteny blocks coverage: 85.56% [12:58:39] INFO: "ctet_SIIPL" synteny blocks coverage: 93.68% [12:58:39] INFO: Reading contigs file [12:58:40] INFO: Detecting chimeric adjacencies Traceback (most recent call last): File "/home/ashwin/tools/Ragout/bin/ragout", line 32, in sys.exit(main()) File "/home/ashwin/tools/Ragout/ragout/main.py", line 295, in main _run_ragout(args) File "/home/ashwin/tools/Ragout/ragout/main.py", line 200, in _run_ragout chim_detect = ChimeraDetector(raw_bp_graphs, run_stages, target_sequences) File "/home/ashwin/tools/Ragout/ragout/breakpoint_graph/chimera_detector.py", line 28, in init self._make_hierarchical_breaks() File "/home/ashwin/tools/Ragout/ragout/breakpoint_graph/chimera_detector.py", line 39, in _make_hierarchical_breaks breaks = self._get_contig_breaks(self.bp_graphs[stage]) File "/home/ashwin/tools/Ragout/ragout/breakpoint_graph/chimera_detector.py", line 94, in _get_contig_breaks subgraphs = bp_graph.connected_components() File "/home/ashwin/tools/Ragout/ragout/breakpoint_graph/breakpoint_graph.py", line 80, in connected_components subgraphs = nx.connected_component_subgraphs(self.bp_graph) AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs'

Is this because I have python3 on my machine? If this is a deprecation issue of networkx in python3 vs python 2.7, how do I ensure that Ragout2.3 that I have installed uses python2.7 only?

mikolmogorov commented 4 years ago

This is likely due to a miassmatching version of networkx (Ragout currently needs version 2.2). The most convenient was to ensure all dependencies are in order is to use bioconda distribution.

Best, Mikhail