# 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/](https://numpy.org/), **scipy** [http://www.scipy.org/](http://www.scipy.org/)
and **joblib** [https://joblib.readthedocs.io/en/stable/](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/](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](https://zenodo.org/records/8157131)
* Snplists: could be download in [https://zenodo.org/records/8157131](https://zenodo.org/records/8157131)
* GWAS Sumstats: should be prepared using csv format with split `\t` and 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:
```{bash}
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:
```{bash}
pmpred --pm precision_matrix_folder -o new_precision_matrix_folder
```
then use pmpred without normalize Precision Matrix
```{bash}
pmpred --pm precision_matrix_folder --snp snplists_folder -s sumstats_file -o output_file --unnormal
```
Other parameters in PMpred could be found in
```{bash}
pmpred -h
```
Raw data
{
"_id": null,
"home_page": "https://github.com/WiuYuan/pmpred",
"name": "PMpred",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "Polygenic Risk Scores, GWAS, Linkage Disequilibrium, Risk Prediction, Precision Matrix",
"author": "Wen Yuan",
"author_email": "wiuwenyuan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/86/83/cd96bf8b399c45ec4d3049e9ffb5af30ac3d6769658ccb0732cb757e6951/pmpred-1.0.4.tar.gz",
"platform": null,
"description": "\n# PMpred\n\nPMpred is a Python based software package that adjusts GWAS summary statistics\nfor the effects of precision matrix (PM), which is the inverse of linkage disequilibrium (LD).\n\n* The current version is 1.0.0\n\n## Getting Started\n\nPMpred can be installed using pip on most systems by typing\n\n`pip install pmpred`\n\n### Requirements\n\nLDpred currently requires three Python packages to be installed and in path. These\nare **numpy** [https://numpy.org/](https://numpy.org/), **scipy** [http://www.scipy.org/](http://www.scipy.org/)\nand **joblib** [https://joblib.readthedocs.io/en/stable/](https://joblib.readthedocs.io/en/stable/). Lastly, PMpred\nhas currently only been tested with **Python 3.6+**.\n\nThe 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/](https://joblib.readthedocs.io/en/stable/), which is also pre-installed on many systems.\n\nWith these three packages in place, you should be all set to install and use PMpred.\n\n### Installing PMpred\n\nAs with most Python packages, configurating LDpred is simple. You can use **pip** to install it by typing\n\n`pip install pmpred`\n\nThis should automatically take care of dependencies. The examples below assume ldpred has been installed using pip.\n\nAlternatively you can use **git** (which is installed on most systems) and clone this repository using the following git command:\n\n`git clone https://github.com/WiuYuan/pmpred.git`\n\nThen open the terminal of the repository folder and run command:\n\n`pip install .`\n\nFinally, you can also download the source files and place them somewhere.\n\nWith the Python source code in place and the three packages **numpy**, **scipy**, and **joblib** installed, then you should be ready to use PMpred.\n\n## Using PMpred\n\nA typical LDpred workflow consists of 3 steps:\n\n### Step 1: Get data incude Precision Matrix, Snplists and GWAS Sumstats\n\nThe first step is to prepare the data we use in PMpred, contain {Precision Matrix, Snplists, GWAS Sumstats}\n\n* Precision Matrix: could be download in [https://zenodo.org/records/8157131](https://zenodo.org/records/8157131)\n* Snplists: could be download in [https://zenodo.org/records/8157131](https://zenodo.org/records/8157131)\n* GWAS Sumstats: should be prepared using csv format with split `\\t` and need include five head {rsid, REF, beta, beta_sd, N}. An example is showed below:\n \n```{}\nrsid REF ALT beta beta_sd N ...\n * * * * * *\n * * * * * *\n * * * * * *\n...\n```\n\nCertainly, you can specify the headers of sumstats and split with parameters in pmpred like below:\n\n```{}\n--rsidname SNP\n--REFname A1\n--ALTname A2\n--betaname BETA\n--sename SE\n--Nname n\n--split ,\n...\n```\n\nThen the sumstats could be like:\n\n```{}\nSNP,A1,A2,BEAT,SE,N,...\n*,*,*,*,*,*,...\n*,*,*,*,*,*,...\n...\n```\n\n### Step 2: Choose the method using in PMpred\n\nAfter getting the required data we could easily get the effect size using the quick start below:\n\n```{bash}\npmpred --pm precision_matrix_folder --snp snplists_folder -s sumstats_file -o output_file\n```\n\nIf you use precision matrix many times, you could first normalize it using command below:\n\n```{bash}\npmpred --pm precision_matrix_folder -o new_precision_matrix_folder\n```\n\nthen use pmpred without normalize Precision Matrix\n\n```{bash}\npmpred --pm precision_matrix_folder --snp snplists_folder -s sumstats_file -o output_file --unnormal\n```\n\nOther parameters in PMpred could be found in\n\n```{bash}\npmpred -h\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python package that adjusts GWAS summary statistics for the effects of Sparse Precision Matrix (PM)",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/WiuYuan/pmpred"
},
"split_keywords": [
"polygenic risk scores",
" gwas",
" linkage disequilibrium",
" risk prediction",
" precision matrix"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c7b48c799a73fc4f875a7c8300c6f7d3510f473f899520d2d43174068414faae",
"md5": "a413a88fd2fe0f797aad6413a9d9c8a8",
"sha256": "4cf6e5d763e7a00f13d43d6f4a78017a0f87203a6f97d18f9c80d8f3d8a607c8"
},
"downloads": -1,
"filename": "PMpred-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a413a88fd2fe0f797aad6413a9d9c8a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 18522,
"upload_time": "2024-07-19T02:13:22",
"upload_time_iso_8601": "2024-07-19T02:13:22.516613Z",
"url": "https://files.pythonhosted.org/packages/c7/b4/8c799a73fc4f875a7c8300c6f7d3510f473f899520d2d43174068414faae/PMpred-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8683cd96bf8b399c45ec4d3049e9ffb5af30ac3d6769658ccb0732cb757e6951",
"md5": "a6d196c7967598b517efe3578543fd8c",
"sha256": "fc32570224b0ba6504a110960261a40510964c75725ad1cb16c8aaf00e7e8983"
},
"downloads": -1,
"filename": "pmpred-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "a6d196c7967598b517efe3578543fd8c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 13722,
"upload_time": "2024-07-19T02:13:23",
"upload_time_iso_8601": "2024-07-19T02:13:23.895291Z",
"url": "https://files.pythonhosted.org/packages/86/83/cd96bf8b399c45ec4d3049e9ffb5af30ac3d6769658ccb0732cb757e6951/pmpred-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-19 02:13:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "WiuYuan",
"github_project": "pmpred",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pmpred"
}