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.
Metadata
Release files for maxgcp 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maxgcp-0.1.5.tar.gz | 5.2 MB | Without provenance | Details for maxgcp-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maxgcp-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for maxgcp-0.1.5-py3-none-any.whl |
Total release size: 11.1 MB
Release files / maxgcp-0.1.5.tar.gz
| Download URL | maxgcp-0.1.5.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46753114ace843262f007308e4f4d44d7eb94c96d9879f2df045d9bbe466c262
|
|
BLAKE2b-256 checksum How to use checksums |
e4b5666809f81cd462b31e92fec2bf09883252c196a2d07ad5f71950ea326383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.20
|
Release files / maxgcp-0.1.5-py3-none-any.whl
| Download URL | maxgcp-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0c0c589326708d65747a4847cb72b044989d3ddb0bb0f6ce5c9da7bc5212e02
|
|
BLAKE2b-256 checksum How to use checksums |
409d0c3e484365f9dd6581715f0977290909870187c91f65e24f083eedca283e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.20
|
Security for maxgcp 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.