Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scikit-bio dependency #26

Closed
jvollme opened this issue Sep 7, 2022 · 4 comments
Closed

scikit-bio dependency #26

jvollme opened this issue Sep 7, 2022 · 4 comments

Comments

@jvollme
Copy link

jvollme commented Sep 7, 2022

when trying to run rosella i got an error during the short read processing step with flight, complaining about the missing skbio module:

[2022-09-07T12:20:35Z ERROR bird_tool_utils::command] Error when running flight process. Exitstatus was : ExitStatus(unix_wait_status(256))
[2022-09-07T12:20:35Z ERROR bird_tool_utils::command] The STDERR was: "09/07/2022 02:20:13 PM INFO: Time - 14:20:13 07-09-2022\n09/07/2022 02:20:13 PM INFO: Command - /home/ww5070/.local/bin/flight bin --assembly ../../../../assembly/220817/All_compare_normA/All_compare_normA_assembly/final.contigs.fa --input rosella_bins//rosella_coverages.tsv --kmer_frequencies rosella_bins//rosella_kmer_table.tsv --min_contig_size 1500 --min_bin_size 200000 --n_neighbors 200 --output_directory rosella_bins// --cores 8\nTraceback (most recent call last):\n  File \"/home/ww5070/.local/bin/flight\", line 8, in <module>\n    sys.exit(main())\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/flight.py\", line 449, in main\n    args.func(args)\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/flight.py\", line 565, in bin\n    rosella = rosella_engine_constructor(args)\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/flight.py\", line 536, in rosella_engine_constructor\n    from flight.rosella.rosella import Rosella\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/rosella/rosella.py\", line 48, in <module>\n    from flight.rosella.validating import Validator\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/rosella/validating.py\", line 49, in <module>\n    from flight.rosella.clustering import Clusterer, iterative_clustering_static, kmeans_cluster\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/rosella/clustering.py\", line 56, in <module>\n    from flight.rosella.binning import Binner\n  File \"/home/ww5070/.local/lib/python3.8/site-packages/flight/rosella/binning.py\", line 43, in <module>\n    import skbio.stats.composition\nModuleNotFoundError: No module named 'skbio'\n"

I did follow the installation procedure given in the readme.md, including installing flight from github using pip:
```pip install git+https://github.com/rhysnewell/flight.git#egg=flight-genome``´

I guess this means that skbio may have to be added to the dependencies? I guess this would be easiest to do by adding it to the conda recipe for rosella?

Edit: also, looking at issue #21 I guess the same applies for matplotlib, seaborn, umap, numba? Maybe it is easiest for now to just change the installation instructions to:

conda create -n rosella
conda activate rosella
conda install -c bioconda scikit-bio matplotlib seaborn umap numba rosella
pip install git+https://github.com/rhysnewell/flight.git#egg=flight-genome
@rhysnewell
Copy link
Owner

Thanks for that John, I'll fix this in future upon the next update. There was a change in some of the required dependencies and I think I might have messed up the conda recipe in the process of trying to trim back on rosella's requirements.

I'll close this once the conda recipe is updated.

Cheers,
Rhys

@jvollme
Copy link
Author

jvollme commented Sep 8, 2022

thanks! But now after creating a new dedicated conda environment for this, i realize that the actual problem is actually with the shebang of the main script of flight (which uses the system python interpreter instead of that of the current conda environment)

@jvollme
Copy link
Author

jvollme commented Sep 8, 2022

ok now i got it installed and running!
Shebang was fine, but there were two other problems:

the first problem (exclusively on my side) was that my conda (although updated) still installs python=2 per default, if not otherwise specified in the recipe. I solved this by explicitely specifying python3 (most more recent conda setups should not do this, but still it may be a good idea to specify python3 as a dependency in the conda recipe?)

The other problem was that the most recent version sci-kit bio in conda does not work wth the most recent version of scipy in conda. So i had to explicitely specify scipy=1.8.1

The other dependencies i thought were necessary are not actually needed to be explicitely specified.

So the updated installation procedure that worked for me is (in case anybody else has the same problem):

conda create -n rosella python=3 scipy=1.8.1 scikit-bio
activate rosella
pip install git+https://github.com/rhysnewell/flight.git#egg=flight-genome

@jvollme jvollme closed this as completed Sep 8, 2022
@rhysnewell
Copy link
Owner

Thanks for working through this, I'll update the setup.py for flight, that should solve any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants