Ragout
Ragout copied to clipboard
NetworkX 2.3 not supported
Dear support!
Since NetworkX 2.3 requires Python 3.5+ (https://networkx.github.io/documentation/stable/install.html) && Ragout uses Python 2.7 it's impossible to run Ragout (or install via conda) with NetworkX 2.3 installed. I have to downgrade first, then Ragout runs OK.
Thanks for letting me know - I will specify networkx version 2.2 as a requirement for now. Will need to transition to Python3 at some point..
I see Ragout depends only on Flye assembler which made for 2.7 version. Does other parts of code run on Python 3.5+ ?
No, Ragout is independent from Flye. Ragout is currently supports only Python 2.7.
Hi @fenderglass, thanks for this wonderful package!
I think you might have to revisit this issue as I faced problems with networkx 2.2.
Traceback (most recent call last):
File "/opt/ngstools/ragout/ragout", line 32, in <module>
sys.exit(main())
File "/opt/ngstools/archive/ragout-2.3/ragout/main.py", line 295, in main
_run_ragout(args)
File "/opt/ngstools/archive/ragout-2.3/ragout/main.py", line 200, in _run_ragout
chim_detect = ChimeraDetector(raw_bp_graphs, run_stages, target_sequences)
File "/opt/ngstools/archive/ragout-2.3/ragout/breakpoint_graph/chimera_detector.py", line 28, in __init__
self._make_hierarchical_breaks()
File "/opt/ngstools/archive/ragout-2.3/ragout/breakpoint_graph/chimera_detector.py", line 39, in _make_hierarchical_breaks
breaks = self._get_contig_breaks(self.bp_graphs[stage])
File "/opt/ngstools/archive/ragout-2.3/ragout/breakpoint_graph/chimera_detector.py", line 94, in _get_contig_breaks
subgraphs = bp_graph.connected_components()
File "/opt/ngstools/archive/ragout-2.3/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'
I fixed this locally using this suggestion and by digging through your code. I made a PR with the solution that works for me. Maybe it's not the best coding practice but it works, given that I am not a Python guy. :)
This worked fine for me ... `conda create -y -n py27 python=2.7
conda activate py27
conda install -c bioconda ragout
ragout -h
conda deactivate `
is this still only for Python2? I got an error with network too:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. pong 1.5 requires networkx~=2.5, but you have networkx 2.2 which is incompatible.
I am using Python 3
@aguilar-gomez there is likely a conflict between the packages in your environment, the easiest thing would be to install ragout in a separate bioconda environment: conda create -n ragout ragout