A Python package that adjusts GWAS summary statistics for the effects of Sparse Precision Matrix (PM)
Project description
PMpred
PMpred is a Python based software package that adjusts GWAS summary statistics for the effects of precision matrix (PM), which is the inverse of linkage disequilibrium (LD).
- The current version is 1.0.0
Getting Started
PMpred can be installed using pip on most systems by typing
pip install pmpred
Requirements
LDpred currently requires three Python packages to be installed and in path. These are numpy https://numpy.org/, scipy http://www.scipy.org/ and joblib https://joblib.readthedocs.io/en/stable/. Lastly, PMpred has currently only been tested with Python 3.6+.
The first two packages numpy and scipy are commonly used Python packages, and pre-installed on many computer systems. The last joblib package can be installed using pip https://joblib.readthedocs.io/en/stable/, which is also pre-installed on many systems.
With these three packages in place, you should be all set to install and use PMpred.
Installing PMpred
As with most Python packages, configurating LDpred is simple. You can use pip to install it by typing
pip install pmpred
This should automatically take care of dependencies. The examples below assume ldpred has been installed using pip.
Alternatively you can use git (which is installed on most systems) and clone this repository using the following git command:
git clone https://github.com/WiuYuan/pmpred.git
Then open the terminal of the repository folder and run command:
pip install .
Finally, you can also download the source files and place them somewhere.
With the Python source code in place and the three packages numpy, scipy, and joblib installed, then you should be ready to use PMpred.
Using PMpred
A typical LDpred workflow consists of 3 steps:
Step 1: Get data incude Precision Matrix, Snplists and GWAS Sumstats
The first step is to prepare the data we use in PMpred, contain {Precision Matrix, Snplists, GWAS Sumstats}
- Precision Matrix: could be download in https://zenodo.org/records/8157131
- Snplists: could be download in https://zenodo.org/records/8157131
- GWAS Sumstats: should be prepared using csv format with split
\tand need include five head {rsid, REF, beta, beta_sd, N}. An example is showed below:
rsid REF ALT beta beta_sd N ...
* * * * * *
* * * * * *
* * * * * *
...
Certainly, you can specify the headers of sumstats and split with parameters in pmpred like below:
--rsidname SNP
--REFname A1
--ALTname A2
--betaname BETA
--sename SE
--Nname n
--split ,
...
Then the sumstats could be like:
SNP,A1,A2,BEAT,SE,N,...
*,*,*,*,*,*,...
*,*,*,*,*,*,...
...
Step 2: Choose the method using in PMpred
After getting the required data we could easily get the effect size using the quick start below:
pmpred --pm precision_matrix_folder --snp snplists_folder -s sumstats_file -o output_file
If you use precision matrix many times, you could first normalize it using command below:
pmpred --pm precision_matrix_folder -o new_precision_matrix_folder
then use pmpred without normalize Precision Matrix
pmpred --pm precision_matrix_folder --snp snplists_folder -s sumstats_file -o output_file --unnormal
Other parameters in PMpred could be found in
pmpred -h
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmpred-1.0.4.tar.gz.
File metadata
- Download URL: pmpred-1.0.4.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc32570224b0ba6504a110960261a40510964c75725ad1cb16c8aaf00e7e8983
|
|
| MD5 |
a6d196c7967598b517efe3578543fd8c
|
|
| BLAKE2b-256 |
8683cd96bf8b399c45ec4d3049e9ffb5af30ac3d6769658ccb0732cb757e6951
|
File details
Details for the file PMpred-1.0.4-py3-none-any.whl.
File metadata
- Download URL: PMpred-1.0.4-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cf6e5d763e7a00f13d43d6f4a78017a0f87203a6f97d18f9c80d8f3d8a607c8
|
|
| MD5 |
a413a88fd2fe0f797aad6413a9d9c8a8
|
|
| BLAKE2b-256 |
c7b48c799a73fc4f875a7c8300c6f7d3510f473f899520d2d43174068414faae
|