metagenome-atlas / atlas_analyze

Scripts to get the most of the output of metagenome-atlas
5 stars 1 forks source link

problems with asyncio when building conda environment with python 3.6 #1

Closed carden24 closed 3 years ago

carden24 commented 3 years ago

Hi, First of all thanks for creating this tool. I had some troubles installing it via conda (mamba really) because of an issue related to the python version needed to build the conda environment. Your conda configuration file suggests we use pyton 3.6 but when I do that I get an error when running the pipeline with ./analyze.py {folder} :

"module 'asyncio' has no attribute 'create_task'"

This is because the create_task top-level function was added in Python 3.7 (https://stackoverflow.com/questions/53247533/attributeerror-module-asyncio-has-no-attribute-create-task)

I modified the conda config file condaenv.yml to replace the depency:

with :

Then, I run the modified setup.py file to create an environment with python 3.7.

The asyncio issue was solved but another one was generated later on with the conversion of the jupyter notebook to html. jupyter nbconvert wanted me to specify the output format. This is probably due to differences in the versions of jupyter installed.

To solve this second option I added the "--to=html" to this line in the snakemake file

Line 90, before:

"jupyter nbconvert --output Summary --TemplateExporter.exclude_input=True {input}"

Line 90, after:

"jupyter nbconvert --output Summary --to=html --TemplateExporter.exclude_input=True {input}"

That solved the problem. Not sure if other problems were generated but just wanted to post this here just in case someone else runs into the same problem.

Cheers,

Erick

SilasK commented 3 years ago

Great, thank you very much @carden24

SilasK commented 3 years ago

Also, have a look at the Jupyter and Rmd I'm preparing for the https://github.com/metagenome-atlas/Tutorial It builds up on the output of atlas analyze.