23andMe / yhaplo

Identifying Y-chromosome haplogroups in arbitrarily large samples of sequenced or genotyped men
Other
103 stars 24 forks source link

Successfully installed UNKNOWN-2.1.12.dev3+g86c9b95 #38

Closed jielab closed 1 month ago

jielab commented 1 month ago

Hi, there:

I found that git clone https://github.com/23andMe/yhaplo.git works, while git clone git@github.com:23andMe/yhaplo.git did NOT work. Don't know if other users encountered the same issue. image

Please see the screenshot below. The command pip install --editable . did not give me any error message, but I could not find a program named yhaplo or UNKNOWN-2.1.12.dev3+g86c9b95. image

Can you please help?

Thanks!

Jie

dpoznik commented 1 month ago

I found that git clone https://github.com/23andMe/yhaplo.git works, whilegit clone git@github.com:23andMe/yhaplo.git did NOT work.

Here are GitHub's instructions on how to connect via SSH: https://docs.github.com/en/authentication/connecting-to-github-with-ssh

SSH is generally preferred, but if you don't want to set that up, I think it should be fine, but slower, to clone the repo over HTTPS.

As to your second question, I'm guessing the issue is related to your use of sudo. With sudo, perhaps the yhaplo executable is getting installed only for the root user. I suggest issuing the pip install command without sudo.

jielab commented 1 month ago

Thanks!

But I still got an error without using "sudo". Please see the screenshot below.

image

dpoznik commented 1 month ago

The version of setuptools you are using is pretty old. Try:

pip install --upgrade setuptools
jielab commented 1 month ago

Thanks!

But please see the screenshot below. It still does not work. It shows ERROR: setuptools==59.6.0 is used in combination with setuptools_scm>=8.x

Best regards, Jie

image

dpoznik commented 1 month ago

It looks like you have upgraded setuptools to 70.0.0 in your user environment, ~/.local/lib/python3.10/site-packages, but when you attempt to install Yhaplo, the build system is using version 59.6.0, despite the fact that we require version 64 or greater: https://github.com/23andMe/yhaplo/blob/86c9b9553178d038f435e6705b94f8556714b5b6/pyproject.toml#L2

I don't have great insight into how your environment is set up, but you may have better luck in a dedicated virtual environment:

python -m venv ~/venvs/yhaplo
source ~/venvs/yhaplo/bin/activate
pip install --upgrade pip setuptools
cd /path/to/yhaplo
pip install --editable .

Then you can use Yhaplo whenever that environment is activated and do deactivate to deactivate.

I think the virtual environment approach would probably be best, but some other things that may be helpful, in arbitrary order:

jielab commented 1 month ago

Ok, thank you so much!

I am using the Ubuntu 22.04.3.LTS coming with Windows 11. I will try to resolve this installation issue myself.

Just wondering: is there a way to make yhaplo analyze Mitochondrial DNA to build phylogenetic trees for females?

Thanks! Jie

dpoznik commented 1 month ago

OK, sounds good; good luck. I am willing to bet that installing into a virtual environment will work for you. I will go ahead and close the Issue, but feel free to follow up if you learn anything interesting.

Although the underlying principle is the same, it would be nontrivial to adapt Yhaplo for use on mtDNA. Haplogrep is a good tool for MT haplogroups: https://haplogrep.readthedocs.io/en/latest/installation/