mikolmogorov / Ragout

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

Installation is broken #33

Closed grayfall closed 5 years ago

grayfall commented 5 years ago

I created a new conda environment for ragout:

$ conda create -n ragout -c bioconda ragout

The following NEW packages will be INSTALLED:

    ca-certificates:       2018.03.07-0                    
    certifi:               2018.11.29-py27_0               
    libedit:               3.1.20170329-h6b74fdf_2         
    libffi:                3.2.1-hd88cf55_4                
    libgcc-ng:             8.2.0-hdf63c60_1                
    libstdcxx-ng:          8.2.0-hdf63c60_1                
    ncurses:               6.1-he6710b0_1                  
    networkx:              1.8-py27_0                      
    openssl:               1.1.1a-h7b6447c_0               
    pip:                   18.1-py27_0                     
    python:                2.7.15-h9bab390_4               
    python-mailund-newick: 1.3-py27_1              bioconda
    ragout:                2.1.1-py27h470a237_5    bioconda
    readline:              7.0-h7b6447c_5                  
    setuptools:            40.6.2-py27_0                   
    sibelia:               3.0.7-h2d50403_1        bioconda
    sqlite:                3.25.3-h7b6447c_0               
    tk:                    8.6.8-hbc83047_0                
    wheel:                 0.32.3-py27_0                   
    zlib:                  1.2.11-h7b6447c_3               

This installation appeared to be insufficient:

(ragout) $ ragout
Traceback (most recent call last):
...
    from decorator import decorator
ImportError: No module named decorator

So, I installed decorator myself

(ragout) $ ragout
Traceback (most recent call last):
  File ".../.conda/envs/ragout/bin/ragout", line 34, in <module>
    from ragout.main import main
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/main.py", line 17, in <module>
    import ragout.assembly_graph.assembly_refine as asref
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/assembly_graph/assembly_refine.py", line 9, in <module>
    import networkx as nx
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/networkx/__init__.py", line 98, in <module>
    import networkx.utils
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/networkx/utils/__init__.py", line 6, in <module>
    from networkx.utils.heaps import *
ImportError: No module named heaps

I figured out, this was a version incompatibility issue, and tried to install a newer version of networkx. Naturally, conda did not let me do it without uninstalling ragout. Finally, I removed the conda environment, created a new one, installed the latest ragout release from sources, installed Sibelia from bioconda and networkx==2.2 from default anaconda channels. This got ragout running, but no entirely:

(ragout) $ ragout -t 8 -o ragout/tmp tmp.rcp 
[18:04:08] INFO: Starting Ragout v2.1.1
[18:04:08] INFO: Running withs synteny block sizes '[5000, 500, 100]'
[18:04:08] INFO: Running Sibelia with block size 5000
[18:04:52] INFO: Running Sibelia with block size 500
[18:05:41] INFO: Running Sibelia with block size 100
[18:07:04] INFO: Inferring phylogeny from synteny blocks data
[18:07:04] INFO: Reading ragout/tmp/sibelia-workdir/100/blocks_coords.txt
[18:07:04] INFO: "1" synteny blocks coverage: 98.79%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp034019" synteny blocks coverage: 99.33%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp016016" synteny blocks coverage: 99.07%
[18:07:04] INFO: "neisseria_gonorrhoeae_ms11_nc_022243" synteny blocks coverage: 99.16%
[18:07:04] INFO: Inferred tree: ('1' : 13.5, ('neisseria_gonorrhoeae_nz_cp016016' : 21.0, ('neisseria_gonorrhoeae_nz_cp034019' : 12.5, 'neisseria_gonorrhoeae_ms11_nc_022243' : 5.5) : 3.5) : 13.5)
[18:07:04] INFO: 'neisseria_gonorrhoeae_ms11_nc_022243' is chosen as a naming reference
[18:07:04] INFO: Processing permutation files
[18:07:04] INFO: Reading ragout/tmp/sibelia-workdir/5000/blocks_coords.txt
[18:07:04] INFO: "1" synteny blocks coverage: 93.9%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp034019" synteny blocks coverage: 90.25%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp016016" synteny blocks coverage: 89.82%
[18:07:04] INFO: "neisseria_gonorrhoeae_ms11_nc_022243" synteny blocks coverage: 89.65%
[18:07:04] INFO: Reading ragout/tmp/sibelia-workdir/500/blocks_coords.txt
[18:07:04] INFO: "1" synteny blocks coverage: 98.25%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp034019" synteny blocks coverage: 99.3%
[18:07:04] INFO: "neisseria_gonorrhoeae_nz_cp016016" synteny blocks coverage: 98.99%
[18:07:04] INFO: "neisseria_gonorrhoeae_ms11_nc_022243" synteny blocks coverage: 99.21%
[18:07:04] INFO: Reading ragout/tmp/sibelia-workdir/100/blocks_coords.txt
[18:07:05] INFO: "1" synteny blocks coverage: 98.79%
[18:07:05] INFO: "neisseria_gonorrhoeae_nz_cp034019" synteny blocks coverage: 99.33%
[18:07:05] INFO: "neisseria_gonorrhoeae_nz_cp016016" synteny blocks coverage: 99.07%
[18:07:05] INFO: "neisseria_gonorrhoeae_ms11_nc_022243" synteny blocks coverage: 99.16%
[18:07:05] INFO: Reading ragout/tmp/sibelia-workdir/100/blocks_coords.txt
[18:07:05] INFO: "1" synteny blocks coverage: 98.79%
[18:07:05] INFO: "neisseria_gonorrhoeae_nz_cp034019" synteny blocks coverage: 99.33%
[18:07:05] INFO: "neisseria_gonorrhoeae_nz_cp016016" synteny blocks coverage: 99.07%
[18:07:05] INFO: "neisseria_gonorrhoeae_ms11_nc_022243" synteny blocks coverage: 99.16%
[18:07:05] INFO: Reading contigs file
[18:07:05] INFO: Detecting chimeric adjacencies
Traceback (most recent call last):
  File ".../.conda/envs/ragout/bin/ragout", line 35, in <module>
    sys.exit(main())
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/main.py", line 290, in main
    _run_ragout(args)
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/main.py", line 198, in _run_ragout
    chim_detect = ChimeraDetector(raw_bp_graphs, run_stages, target_sequences)
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/breakpoint_graph/chimera_detector.py", line 26, in __init__
    self._make_hierarchical_breaks()
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/breakpoint_graph/chimera_detector.py", line 37, in _make_hierarchical_breaks
    breaks = self._get_contig_breaks(self.bp_graphs[stage])
  File ".../.conda/envs/ragout/lib/python2.7/site-packages/ragout/breakpoint_graph/chimera_detector.py", line 101, in _get_contig_breaks
    for (u, v, data) in subgr.bp_graph.edges_iter(data=True):
AttributeError: 'MultiGraph' object has no attribute 'edges_iter'

Other parameters (e.g. ragout --refine --repeats) produce different (though seemingly related) errors, such as this one https://github.com/fenderglass/Ragout/issues/31

mikolmogorov commented 5 years ago

Hi,

Sorry for the late response! The networkx package should be of version 1.8. It seems that more recent version are not backward compatible. If you are using source installation, you should be able to run ragout from the source directory (bin/ragout), but in case you are doing manual system installation, you will need to add networkx 1.8 as well.

Regarding the bioconda issue - something is definitely not right. First, it seems that the decorator package is not included in some Python interpreters - probably I will need to add this dependency manually. What is the OS you are using? Second error seems weird - looks like there is a mix of multiple networkx versions. My networkx from conda (v1.8) does not have this line from utils/init.py that gives you the error. Have you installed any packages manually (through pip) in the environment? You can try to create a fresh environment, manually install the decorator packages and see what happens.

mikolmogorov commented 5 years ago

Closing due to inactivity - feel free to reopen if the issue remains.