Optimized phenotype definitions boost GWAS power
Project description
Maximum genetic component phenotyping
Maximum genetic component phenotyping. Optimized phenotype definitions boost GWAS power.
maxgcp
is a Python package that implements maximum genetic component phenotyping (MaxGCP), a method that optimizes a linear phenotype definition to maximize its heritability and genetic correlation with a trait of interest.
In short, this method results in a phenotype definition that is, close to the genetic component of the trait of interest, on the individual level.
This phenotype definition can be used in various applications, including enhancement of statistical power in genome-wide association studies (GWAS).
maxgcp
requires only estimates of genetic and phenotypic covariances, which can be obtained from GWAS summary statistics.
Usage
import maxgcp
import numpy as np
# Genetic covariances between target and feature phenotypes
genetic_cov_vec = np.array([0.5, 0.75, 0.25])
phenotypic_cov_mat = np.array([
[0.5, 0.25, 0.1],
[0.25, 0.3, 0.05],
[0.1, 0.05, 0.6],
])
# Compute the MaxGCP phenotype (defined by these weights)
w = maxgcp.fit_coheritability(genetic_cov_vec, phenotypic_cov_mat)
# Evaluate MaxGCP at the individual level
feature_phenotypes = np.array([
[1, 0, 0],
[0, 0, 1],
[1, 1, 1],
[0, 0, 0],
])
maxgcp_phenotypes = feature_phenotypes @ w
# Show the results
>>> maxgcp_phenotypes
array([-0.34242555, 0.18438299, 1.87895044, 0. ])
MaxGCP fits a phenotype (y) to a target (z) to maximize coheritability between y and z.
This package can also fit a maximally heritable phenotype maxgcp.fit_heritability
or a maximally genetically correlated phenotype (maxgcp.fit_genetic_correlation
.
Installation
pip install maxgcp
maxgcp
depends on NumPy, SciPy, and pandas.
Project details
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 maxgcp-0.1.4.tar.gz
.
File metadata
- Download URL: maxgcp-0.1.4.tar.gz
- Upload date:
- Size: 5.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee8c17f4f549d312a11931cd386268e2ddf343d2972a6921071e82dfd8ea1bd |
|
MD5 | eae61e05234c4077758e394e7b19b783 |
|
BLAKE2b-256 | 477b3b53fabac5e6e0af9f03934fae50efdac3155d822bdc40e642ed57042605 |
File details
Details for the file maxgcp-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: maxgcp-0.1.4-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c61bc74d3704169319ec3ade9641bea193beea241a0b6504e5f5fe943a632b |
|
MD5 | 70f41985ef7bfe59ed1de653613a4791 |
|
BLAKE2b-256 | f403318c0906cfee0d06a1787e83cbff8971bd4fac1d0e0a3b4d3fbd588ea6d1 |