Indirect GWAS
Indirect GWAS is a Rust program for computing genome-wide association study results indirectly. Unlike traditional methods, indirect GWAS generates GWAS summary statistics for a phenotype definition using only other summary statistics. To do so, we approximate a target phenotype using phenotypes for which GWAS summary statistics are already available.
As an example, indirect GWAS allows you to compute GWAS summary statistics for phecodes using only summary statistics about ICD-10 codes.
Traditional approach:
- Define phenotype in terms of clinically-observed features
- Evaluate phenotype for every individual
- Perform GWAS
Indirect approach:
- Define phenotype in terms of features that have available GWAS summary statistics (using e.g. Pan-UKBB summary statistics)
- Compute GWAS summary statistics for the target using feature summary statistics as inputs
Installation
If cargo is not installed, see cargo installation.
cargo install --git https://github.com/tatonetti-lab/indirect-gwas
Usage
Indirect GWAS is a command line tool.
As an example,
igwas \
-p projection.tsv \
-c covariance.tsv \
-g plink*.glm.linear \
-o indirect_results.csv
To see a full list of parameters, run
igwas -h
Indirect GWAS takes four main arguments:
- Projection matrix
- Covariance matrix
- GWAS result files
- Output path
Each of these is a path in the filesystem.
Projection matrix
This should be a CSV/TSV file with row and column names. The first column of the first row is ignored. For example:
rowid,proj1,proj2
feat1,0.1,0.2
feat2,0.2,-0.511119
The contents of this file should give the coefficients needed to project feature phenotypes onto the projected phenotypes.
In the example above, proj1 is a projection defined as 0.1 * feat1 + 0.2 * feat2.
Many projections can be passed simultaneously in this file.
Covariance matrix
This should be a CSV/TSV file with row and column names. The first column of the first row is ignored. The row and column names should match, otherwise. For example:
_,feat1,feat2
feat1,0.1,0.1
feat2,0.1,0.5
The contents of this file should give the partial covariances of the feature phenotype.
Partial covariance is defined as the covariance of the residuals of the phenotypes when regressed against the GWAS covariates.
For example, if each GWAS regression takes the form phenotype ~ genotype + covar_1 + covar_2, you should regress phenotype ~ covar_1 + covar_2, compute the residuals, do this for every phenotype, then compute the covariance matrix of these residuals.
GWAS results
GWAS results should be formatted as CSV/TSV files.
These files should contain, at minimum, columns with the following pieces of information: variant ID, coefficient estimate, standard error, and sample size.
The column names may be specified with additional flags (e.g. --variant-id, --beta, etc.).
The default field names correspond to the outputs of Plink linear regressions.
Output path
This should be a simple path to a single file. This file will contains GWAS summary statistics for all the projected phenotypes, combined.
Metadata
Release files for igwas 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| igwas-0.1.0.tar.gz | 49.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| igwas-0.1.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
Total release size: 1.3 MB
Release files / igwas-0.1.0.tar.gz
| Download URL | igwas-0.1.0.tar.gz |
|---|---|
| Size | 49.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8051b6cf907706d88519ca994f2224ed689b18eebdf04241e29efd2bafe8901a
|
|
BLAKE2b-256 checksum How to use checksums |
8eef52e4a54bcef01ecf7593b1ba6c78124f4e131ef3d6df04131d03f93a9d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.20
|
Release files / igwas-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | igwas-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9f24b39f844fefdf092971ee143e0daa5094973e00c8c5e746307090146f7c40
|
|
BLAKE2b-256 checksum How to use checksums |
03324936c7abbc171b7a06a40b6c32bb52955693b2e8011548a3eccfe67cea98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.20
|