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

Anaconda3 does not work, really... #178

Open
jielab opened this issue Nov 19, 2019 · 4 comments
Open

Anaconda3 does not work, really... #178

jielab opened this issue Nov 19, 2019 · 4 comments

Comments

@jielab
Copy link

jielab commented Nov 19, 2019

**Hi, guys:

It seems that LDSC does NOT work with python3 and therefore Anaconda3. I am really frustrated, since I tried various ways to install and it still does not work. Now I have both Anaconda3 and Anaconda2, and sometimes these two fight.

I think Python2 is almost outdated, while LDSC is relatively new. Can someone please let me know how to make LSDC work nicely with python3 and therefore Anaconda3?

Thank you & best regards,
Jie**

@shz9
Copy link

shz9 commented Nov 21, 2019

I created a python3 compatible version of the LDSC package. Can be found on this branch:

https://github.com/shz9/ldsc

Note: I haven't tested the conversion thoroughly, so you may encounter some issues. If you find any errors, please submit a ticket and I'll try and handle them as soon as I can.

@bulik / @tpoterba Can we merge both the branches once the code is fully tested?

@jielab
Copy link
Author

jielab commented Nov 21, 2019

Hi, there:

Thanks! It seems that LDSC does work with Anaconda3. There was simply a numpy error. As someone stated on this post #173, i only need to change numpy==1.12 to numpy==1.16.0 in the environment.yml file, then the installation process actually worked just fine!
So, can you please confirm this is the case and then fix the environment.yml file from the downloading, so that others will not run into the same problem?

Now I do have a question on munge_sumstats.py. Please see my screenshot attached below, this command is still running, after 5 hours. So, I assume there is something wrong. I noticed that munge_sumstats.py will complain if my GWAS file has both "EAF" and "MAF", even when I specified "--freq EAF". I had to rename "MAF" to "MAF1" to make it work.

My original GWAS summary statistics file have "BETA" and "SE", but not "Z". I assume that munge_sumstats.py will calculate a Z ( =BETA/SE ). However, I am not understanding why I need to write "--signed-sumstats BETA,0" in the munge_sumstats.py. What does 0 mean here? Shouldn't it be "--signed-sumstats BETA,SE" instead? Will munge_sumstats.py work if my GWAS file only has BETA but not SE?

Your clarification is greatly appreciated!

Best regards,
Jie
捕获

@shz9
Copy link

shz9 commented Nov 21, 2019

Your question was partly about running LDSC with python3. You can install python2 packages with anaconda3, but that doesn't mean they will work with python3. If you want to run LDSC with python3, you need to update the code to be python3-compatible (which is what I did).

I'm not a developer for the LDSC package, so I can't update the main repo directly.

Regarding the "BETA,0" thing, please read the documentation or run munge_sumstats.py -h for clarification on the meaning of the arguments. The explanation is here:

Name of signed sumstat column, comma null value (e.g., Z,0 or OR,1). NB: case insensitive.

In other words, 0 is the null value for the BETA summary statistics.

If you have other issues unrelated to versioning (python2/python3), I recommend opening a new thread.

@kotoroshinoto
Copy link

kotoroshinoto commented Feb 24, 2020

https://www.python.org/doc/sunset-python-2/

This tool must be ported to python3 to continue to be relevant in the future. Python2 is being forcefully abandoned by the devs.

I cloned the repo and found that the munge script at least still has some python2 anachronisms (such as xrange), its possible that the ldsc script itself does not have this issue.

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

3 participants