-
Notifications
You must be signed in to change notification settings - Fork 81
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
The way American-Gut repo was intended to be used? #204
Comments
The auxillary files are primarily intended for use in the notebooks. At this point, analysis is wrapped into the notebook. Over the course of the project, there has been an evolution in the best way to call these functions within a notebook (command line utils vs imported functions). There has also been an evolution in the best enviroment and package management approach. The installation described in #199 is reflective of the current conda install. As far as I can tell from the repeated research, conda doesn't easily support pythonpath modifications. The best suggestion I've seen is modifying a .pth file, which has its own set of challenges. Therefore, its necessary to include a setup.py and install the repository using pip if you wish to have the auxillary code work on the enviroment. If you're using another environment manager (virtualenv, for instance) which lets you modify the pythonpath, its preferable to modify the path and pythonpath. |
Thank you for the reply. I've tried it now with conda (instructions from #199) and it still doesn't work. Folders
Therefore, IMHO the problem isn't in conda vs pip. Since americangut is installed as a package I would like to help with improving this (making it more reproducible, working on different platforms, ...) but I need to know what was the intended way to run it. An example from scratch would help a lot with comments on following question:
|
Thanks, Ivo. Data and latex are intended to be part of the repo. I
|
Thanks. If it is intended to be used only as a repo then adjusting PYTHONPATH and PATH should be enough. |
Resolved with #211 |
Hi,
I've been struggling with American-Gut repo and the way I should use it for the past few days. If I understood correctly the repo is broken into a package ('americangut' dir) and auxiliary files. Some of these files are intended to be used by the package itself while others are for interactive sessions with ipython notebooks for example.
In (#199) @jwdebelius recommends installing the package with
pip install . -e --no-deps
. Therefore,americangut
dir indeed was intended to be used as a package. Still, this will not install folderslatex
andtests
from package_data since setup.py seems to be a bit mis-configured (package_data should be a part of src dir of the package).Also, running (e.g.)
01-get_sequences_and_metadata.md
will fail onstudy_accessions = agenv.get_study_accessions()
since it callsget_repository_dir
(fromresults_utils.py
) which will strangely take a part of the full path (outside of the package dir) and will try to find 'data' and 'latex' there. Moreover, 'data' isn't even specified in the setup.py.Therefore, I'm not quite sure how should I use the repo. Should I define PYTHONPATH to include the repo and PATH to include scripts without installing the package or should I install the package (as recommended by @jwdebelius). If I need to install it, what else do I need to adjust to make it work (PATHs, PYTHONPATHs, ...)?
The text was updated successfully, but these errors were encountered: