Add your description here
Project description
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.
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
File details
Details for the file igwas-0.1.0.tar.gz
.
File metadata
- Download URL: igwas-0.1.0.tar.gz
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8051b6cf907706d88519ca994f2224ed689b18eebdf04241e29efd2bafe8901a |
|
MD5 | f352bd2202f6b809b429d52d3f3c463f |
|
BLAKE2b-256 | 8eef52e4a54bcef01ecf7593b1ba6c78124f4e131ef3d6df04131d03f93a9d09 |
File details
Details for the file igwas-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: igwas-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f24b39f844fefdf092971ee143e0daa5094973e00c8c5e746307090146f7c40 |
|
MD5 | 7f208f227e0b9750751bbbdb38882d8c |
|
BLAKE2b-256 | 03324936c7abbc171b7a06a40b6c32bb52955693b2e8011548a3eccfe67cea98 |