omerwe / leap Goto Github PK
View Code? Open in Web Editor NEWLiability Estimation for Case-Control Studies
License: Apache License 2.0
Liability Estimation for Case-Control Studies
License: Apache License 2.0
hello,
I've been recently using LEAP on two data sets on which it seems to have run without problems. I'm now trying it on a third data set but on this one I get h2 values >1 (as per below log). This consequently generates problems when I run probit.py:
/home/manduchi/mypy/lib/python2.7/site-packages/leap/probit.py:57: RuntimeWarning: invalid value encountered in sqrt
normPDF = stats.norm(0, np.sqrt(1-h2))
...
Can you advice?
Thanks,
Elisabetta
=== calc_h2.py run
python calc_h2.py --bfilesim data_autosome --prev 0.1 --pheno leap.phe --eigen leap_noChr1.kin.npz --extractSim noChr1.snps --related leap.rm
/home/
manduchi/mypy/lib/python2.7/site-packages/pysnptools/snpreader/bed.py:42: FutureWarning: 'count_A1' was not set. For now it will default to 'False', but in the future it will default to 'True'
warnings.warn("'count_A1' was not set. For now it will default to 'False', but in the future it will default to 'True'", FutureWarning)
WARNING:root:loadPhen is using default missing value of '-9'.
WARNING:root:loadPhen is using default missing value of '-9'.
29 individuals will be removed due to high relatedness
Removing the top 10 PCs from the kinship matrix
Computing h2 for a binary phenotype
h2: 1.241879
Hello LEAP developers,
I'm trying to install LEAP to be able to run Fast-LMM using binary traits for interaction analysis. However, I'm having a hard time installing LEAP. Any help is appreciated!
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: leap_gwas in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages/leap_gwas-0.1.7.2-py2.7.egg (0.1.7.2)
Requirement already satisfied: numpy in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from leap_gwas) (1.16.6)
Requirement already satisfied: scipy in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from leap_gwas) (1.2.3)
Collecting fastlmm
Using cached https://files.pythonhosted.org/packages/4e/62/6bd368f9f7b7b3d2cc3d184c7f2f97d509a8402bb80dd51f135d1dc98857/fastlmm-0.4.8.tar.gz
Installing build dependencies ... done
WARNING: Missing build requirements in pyproject.toml for fastlmm from https://files.pythonhosted.org/packages/4e/62/6bd368f9f7b7b3d2cc3d184c7f2f97d509a8402bb80dd51f135d1dc98857/fastlmm-0.4.8.tar.gz#sha256=a3fb5c0468fb2978543d606d651292684943dd0fe66c975634ea17ea861823f1 (from leap_gwas).
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: scikit-learn in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from leap_gwas) (0.20.4)
Requirement already satisfied: pandas in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from leap_gwas) (0.24.2)
Collecting statsmodels>=0.10.1
Using cached https://files.pythonhosted.org/packages/53/1c/b83f6a4632b502a20b0f83bc5c25ebfa03eebd00efe9b45fcdcde1a0ab40/statsmodels-0.11.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting psutil>=5.6.7
Using cached https://files.pythonhosted.org/packages/aa/3e/d18f2c04cf2b528e18515999b0c8e698c136db78f62df34eee89cee205f1/psutil-5.7.2.tar.gz
Collecting matplotlib>=1.5.1
Using cached https://files.pythonhosted.org/packages/9d/40/5ba7d4a3f80d39d409f21899972596bf62c8606f1406a825029649eaa439/matplotlib-2.2.5-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pysnptools>=0.4.10
Using cached https://files.pythonhosted.org/packages/29/6e/430a65ae359c52571878f045b481693f30c151302e410480fece8f62db25/pysnptools-0.4.20.tar.gz
Installing build dependencies ... done
WARNING: Missing build requirements in pyproject.toml for pysnptools>=0.4.10 from https://files.pythonhosted.org/packages/29/6e/430a65ae359c52571878f045b481693f30c151302e410480fece8f62db25/pysnptools-0.4.20.tar.gz#sha256=f1d007e02d3581e558f35a2bd53ed92cd9678d5326afb463f12047b9b26516c2 (from fastlmm->leap_gwas).
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting dill>=0.2.9
Using cached https://files.pythonhosted.org/packages/e2/96/518a8ea959a734b70d2e95fef98bcbfdc7adad1c1e5f5dd9148c835205a5/dill-0.3.2.zip
Requirement already satisfied: pytz>=2011k in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from pandas->leap_gwas) (2020.1)
Requirement already satisfied: python-dateutil>=2.5.0 in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from pandas->leap_gwas) (2.8.1)
Collecting patsy>=0.5
Using cached https://files.pythonhosted.org/packages/ea/0c/5f61f1a3d4385d6bf83b83ea495068857ff8dfb89e74824c6e9eb63286d8/patsy-0.5.1-py2.py3-none-any.whl
Collecting subprocess32
Using cached https://files.pythonhosted.org/packages/93/dc/3a0ae313f1cf0f59b582e8e14891196e51fca5db193558b7661bd32b8801/subprocess32-3.5.4-cp27-cp27mu-manylinux2014_x86_64.whl
Collecting cycler>=0.10
Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.10 in /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages (from matplotlib>=1.5.1->fastlmm->leap_gwas) (1.15.0)
Collecting backports.functools-lru-cache
Using cached https://files.pythonhosted.org/packages/da/d1/080d2bb13773803648281a49e3918f65b31b7beebf009887a529357fd44a/backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1
Using cached https://files.pythonhosted.org/packages/3d/78/cb9248b2289ec31e301137cedbe4ca503a74ca87f88cdbfd2f8be52323bf/kiwisolver-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting h5py>=2.10.0
Using cached https://files.pythonhosted.org/packages/12/90/3216b8f6d69905a320352a9ca6802a8e39fdb1cd93133c3d4163db8d5f19/h5py-2.10.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting bgen-reader>=4.0.4
Using cached https://files.pythonhosted.org/packages/ef/f4/2775ad723b7011603ea1a3ca7021a554465e3175eaa1499590b11960fce7/bgen-reader-4.0.6.tar.gz
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/bin/python /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-x8e5wp/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=49.3.0' 'wheel>=0.34.2'
cwd: None
Complete output (3 lines):
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Could not find a version that satisfies the requirement setuptools>=49.3.0 (from versions: 0.6b1, 0.6b2, 0.6b3, 0.6b4, 0.6rc1, 0.6rc2, 0.6rc3, 0.6rc4, 0.6rc5, 0.6rc6, 0.6rc7, 0.6rc8, 0.6rc9, 0.6rc10, 0.6rc11, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.8, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.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 24.0.0, 24.0.1, 24.0.2, 24.0.3, 24.1.0, 24.1.1, 24.2.0, 24.2.1, 24.3.0, 24.3.1, 25.0.0, 25.0.1, 25.0.2, 25.1.0, 25.1.1, 25.1.2, 25.1.3, 25.1.4, 25.1.5, 25.1.6, 25.2.0, 25.3.0, 25.4.0, 26.0.0, 26.1.0, 26.1.1, 27.0.0, 27.1.0, 27.1.2, 27.2.0, 27.3.0, 27.3.1, 28.0.0, 28.1.0, 28.2.0, 28.3.0, 28.4.0, 28.5.0, 28.6.0, 28.6.1, 28.7.0, 28.7.1, 28.8.0, 28.8.1, 29.0.0, 29.0.1, 30.0.0, 30.1.0, 30.2.0, 30.2.1, 30.3.0, 30.4.0, 31.0.0, 31.0.1, 32.0.0, 32.1.0, 32.1.1, 32.1.2, 32.1.3, 32.2.0, 32.3.0, 32.3.1, 33.1.0, 33.1.1, 34.0.0, 34.0.1, 34.0.2, 34.0.3, 34.1.0, 34.1.1, 34.2.0, 34.3.0, 34.3.1, 34.3.2, 34.3.3, 34.4.0, 34.4.1, 35.0.0, 35.0.1, 35.0.2, 36.0.1, 36.1.0, 36.1.1, 36.2.0, 36.2.1, 36.2.2, 36.2.3, 36.2.4, 36.2.5, 36.2.6, 36.2.7, 36.3.0, 36.4.0, 36.5.0, 36.6.0, 36.6.1, 36.7.0, 36.7.1, 36.7.2, 36.8.0, 37.0.0, 38.0.0, 38.1.0, 38.2.0, 38.2.1, 38.2.3, 38.2.4, 38.2.5, 38.3.0, 38.4.0, 38.4.1, 38.5.0, 38.5.1, 38.5.2, 38.6.0, 38.6.1, 38.7.0, 39.0.0, 39.0.1, 39.1.0, 39.2.0, 40.0.0, 40.1.0, 40.1.1, 40.2.0, 40.3.0, 40.4.0, 40.4.1, 40.4.2, 40.4.3, 40.5.0, 40.6.0, 40.6.1, 40.6.2, 40.6.3, 40.7.0, 40.7.1, 40.7.2, 40.7.3, 40.8.0, 40.9.0, 41.0.0, 41.0.1, 41.1.0, 41.2.0, 41.3.0, 41.4.0, 41.5.0, 41.5.1, 41.6.0, 42.0.0, 42.0.1, 42.0.2, 43.0.0, 44.0.0, 44.1.0, 44.1.1)
ERROR: No matching distribution found for setuptools>=49.3.0
----------------------------------------
ERROR: Command errored out with exit status 1: /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/bin/python /gpfs/ysm/project/dewan/dc2325/conda_envs/py2/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-x8e5wp/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=49.3.0' 'wheel>=0.34.2' Check the logs for full command output.
This is the error message. I have tried to update steuptools to newer version but it does not seem to work. Is it possible to install LEAP using python 3. Thank you
Hi Omer,
Thanks for developing such good software. I am currently using WTCCC binary traits to create liability scores for downstream analysis.
I first checked if LEAP runs well on my side by doing test.py. I found the liability scores generated in dataset1.phe.liab matches the 6th column in the fam file there. So I assume that my coding there is correct.
And I applied the LEAP there for RA and T1d in WTCCC data. I used the raw genotype data with about 300k SNPs. I have 2938 controls, and different numbers of cases for different traits. I found the liability scores for cases are all the same and are different among controls, which is suspicious. I am wondering if you have any ideas about why it happens there.
Best,
Boran
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.