phbradley / conga

Clonotype Neighbor Graph Analysis
MIT License
80 stars 18 forks source link

Setup.py #3

Closed vincenthahaut closed 3 years ago

vincenthahaut commented 4 years ago

Hello!

I would like to try this new module on my own data. Unfortunately the instructions to install it only cover the dependencies. My attempts at installing it from github all failed due to the lack of setup.py file in the package.

Could you provide this file or detail how to install conga without ?

Thank you in advance.

phbradley commented 4 years ago

Hi there, Thanks for your interest! Yes I am afraid that we don't have all the usual bells and whistles at the moment. Here is what I have been doing: at the top of the python script or notebook that needs to use conga tools, add the conga github directory to sys.path (where the 'conga github directory' is the place on your system where you downloaded the conga repository. It should contain a directory called 'conga' and also one called 'scripts')

import sys sys.path.append('/path/to/github/conga/') # replace this string with the location of the conga repository on your system

Let me know if that works. We are a small team and not python package pros so if you have advice/pointers to how to make an appropriate setup.py script feel free to send those.

vincenthahaut commented 4 years ago

Hi!

Thank you very much for this fast answer. I will give it a try and come back to you.

Unfortunately I am more an "R" person and cannot really help on the setup.py script. I just stumbled across this post:

https://stackoverflow.com/questions/9714635/how-to-install-python-module-without-setup-py

but as your master folder also contains conga/data/aa_props.tsv I was afraid that this simple trick would not link the data folder to the rest of the scripts.

On the other hand, your previous "tcr-dist" module is working like a charm with its setup.py.

vincenthahaut commented 4 years ago

Update: I am sorry to say that your fix is not working.

I also tried to create a setup.py file as described here: https://packaging.python.org/tutorials/packaging-projects/

It allows python to build the package but does not create a valid module in the python library path. I suspect that both the init and folder architecture are not entirely right. This is unfortunately beyond my skills.

phbradley commented 4 years ago

Bummer! If it's not too much trouble and you are sufficiently interested, perhaps you could tell a tiny bit more about how my fix fails and in what context: jupyter notebook? python script? Any useful error messages? Regardless, thanks for your input.

vincenthahaut commented 3 years ago

Solved by simply setting up the current path to the main directory of Conga.