Skip to main content

Conditional Analysis with LD Matrix.

Project description

cojopy

pypi python Build Status codecov License: MIT

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: For cond command, path to the file containing the SNPs to condition on, one SNP per line.
  • extract-snps: For joint and cond commands, 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 unless ld-freq is provided.

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

cojopy-1.0.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cojopy-1.0.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file cojopy-1.0.0.tar.gz.

File metadata

  • Download URL: cojopy-1.0.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cojopy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2648ebf12ee9e1075944c296f58a97d0422281373d39f087c7d1c43f4239c383
MD5 30bb4d5aaf3cf8e9bb81734a5abb4fa2
BLAKE2b-256 8659930d0470cb96c770f0b1474980d71d107981c58be99b4f2bb4bd1b3f7b6e

See more details on using hashes here.

File details

Details for the file cojopy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cojopy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cojopy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb23c1193cd5cfeee498586969597afe17f59ed7647e9eff9e4165440c0e531
MD5 8d33b9800143d41c8101d64dae7b80a9
BLAKE2b-256 4543ac0231ce6672dec3dca625de78b6fe1bfb439acea582bb3a0eba4852c4c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page