cojopy
Conditional Analysis with LD Matrix
Get the same results as GCTA COJO, but with LD matrix.
Installation
pip install cojopy
or with uv:
uv pip install cojopy
Usage
Input files
Summary statistics file
The summary statistics file should have the following columns (same as the cojo file of GCTA):
- SNP: SNP ID
- A1: Effect allele
- A2: Other allele
- b: Effect size
- se: Standard error
- p: P-value
- freq: Minor allele frequency
- N: Sample size
LD matrix file
- A tab-delimited LD matrix, same as the output of
plink --r square.
[!Note] The allele order of the summary statistics file should be the same as the allele order of the LD matrix file.
Stepwise model selection of independent associated SNPs (same as gcta --cojo-slct)
cojo slct \
--sumstats ./exampledata/sim_gwas.ma \
--ld-matrix ./exampledata/sim_r.ld \
--output ./exampledata/slct.txt
Fit all the included SNPs to estimate their joint effects without model selection (same as gcta --cojo-joint)
cojo joint \
--sumstats ./exampledata/sim_gwas.ma \
--ld-matrix ./exampledata/sim_r.ld \
--extract-snps ./exampledata/extract_snps.txt \
--output ./exampledata/joint.txt
Perform association analysis of the included SNPs conditional on the given list of SNPs (same as gcta --cojo-cond)
cojo cond \
--sumstats ./exampledata/sim_gwas.ma \
--ld-matrix ./exampledata/sim_r.ld \
--cond-snps ./exampledata/cond_snps.txt \
--output ./exampledata/cond.txt
Parameters
cond-snps: Forcondcommand, path to the file containing the SNPs to condition on, one SNP per line.extract-snps: Forjointandcondcommands, path to the file containing the SNPs to extract, one SNP per line.ld-freq: Path to the LD frequency file, optional, use freq in sumstats if not provided.p-cutoff: P-value cutoff, default is 5e-8.collinear-cutoff: Collinearity cutoff, default is 0.9.maf-cutoff: Minor allele frequency cutoff, default is 0.01.diff-freq-cutoff: Difference in minor allele frequency cutoff, default is 0.2, won't take effect unlessld-freqis provided.
Metadata
Release files for cojopy 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| cojopy-1.0.0.tar.gz | 18.5 kB | Without provenance | Details for cojopy-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cojopy-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cojopy-1.0.0-py3-none-any.whl |
Total release size: 29.7 kB
Release files / cojopy-1.0.0.tar.gz
| Download URL | cojopy-1.0.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2648ebf12ee9e1075944c296f58a97d0422281373d39f087c7d1c43f4239c383
|
|
BLAKE2b-256 checksum How to use checksums |
8659930d0470cb96c770f0b1474980d71d107981c58be99b4f2bb4bd1b3f7b6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / cojopy-1.0.0-py3-none-any.whl
| Download URL | cojopy-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcb23c1193cd5cfeee498586969597afe17f59ed7647e9eff9e4165440c0e531
|
|
BLAKE2b-256 checksum How to use checksums |
4543ac0231ce6672dec3dca625de78b6fe1bfb439acea582bb3a0eba4852c4c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for cojopy 1.0.0
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.