Skip to main content

multi-ancestry fine-mapping pipeline.

Project description

CREDTOOLS

pypi python Build Status codecov License: MIT

CREDTOOLS is a command-line and Python toolkit for GWAS fine-mapping workflows. It helps you standardize summary statistics, define loci, prepare LD-backed locus files, run QC, combine cohorts, and run fine-mapping tools from one repeatable interface.

Documentation: https://Jianhua-Wang.github.io/credtools

What It Does

  • Standardizes raw GWAS summary statistics with credtools munge.
  • Finds and chunks loci from genome-wide summary statistics with credtools chunk.
  • Prepares locus-level summary statistics, LD matrices, and LD maps.
  • Runs meta-analysis with meta_all, meta_by_population, or no_meta.
  • Runs QC for LD and summary-statistic consistency.
  • Runs fine-mapping with SuSiE, FINEMAP, ABF, CARMA, SuSiEx, MultiSuSiE, MESuSiE, and RSparsePro wrappers.
  • Writes PIP tables, credible set summaries, causal-variant tables, logs, and plots.

Install

python -m pip install credtools
credtools --version

CREDTOOLS supports Python >=3.9,<3.13.

Some workflows need external tools:

Workflow Extra dependency
LD extraction in chunk PLINK
--tool finemap FINEMAP executable
--tool susiex SuSiEx executable
--tool susie_ash or susie_inf Rscript and susieR >= 0.16.1
--tool carma Rscript and CARMA
--tool mesusie Rscript and MESuSiE

See the external tools guide for setup checks.

Quick Start

Start from a population config:

popu	cohort	sample_size	path	ld_ref
EUR	UKBB	400000	/data/EUR.sumstats.gz	/ref/EUR
AFR	MVP	90000	/data/AFR.sumstats.gz	/ref/AFR

Run the workflow:

credtools munge population_config.tsv work/munged
credtools chunk work/munged/sumstat_info_updated.txt work/chunks
credtools pipeline work/chunks/loci_list.txt work/results \
  --tool susie \
  --meta-method meta_all \
  --max-causal 5

Before a full run, inspect work/chunks/loci_list.txt. If chunk wrote a placeholder sample_size or cohort label, edit it before fine-mapping.

Main Commands

Command Use it for
credtools munge clean and standardize summary statistics
credtools chunk find loci, create chunks, and prepare LD-backed files
credtools prepare build LD-backed locus files from chunked sumstats and genotype references
credtools meta combine cohorts before QC or fine-mapping
credtools qc check summary-statistic and LD consistency
credtools finemap run fine-mapping only
credtools pipeline run meta-analysis, QC, and fine-mapping together
credtools plot create QC and fine-mapping plots

Key Input

Most downstream commands use a loci_list.txt:

locus_id	chr	start	end	popu	cohort	sample_size	prefix
locus_1	1	50000000	50500000	EUR	UKBB	400000	data/EUR_UKBB_locus_1

Each prefix should point to:

{prefix}.sumstats.gz
{prefix}.ld.npz
{prefix}.ldmap.gz

See the file schema reference for exact columns and accepted file names.

Development

git clone https://github.com/Jianhua-Wang/credtools.git
cd credtools
uv sync
uv run pytest
uv run mkdocs serve

Links

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

credtools-0.9.2.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

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

credtools-0.9.2-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file credtools-0.9.2.tar.gz.

File metadata

  • Download URL: credtools-0.9.2.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for credtools-0.9.2.tar.gz
Algorithm Hash digest
SHA256 bbd91a638ff7ccf4fb833890b9ce4e7e4261ca06aa96729e1d32519a0f144c82
MD5 e6d634d0bb895a3ac28d2136bcfafd90
BLAKE2b-256 d72013a6f3a2f952a1a46b63bb21670ac59b53a846194163bbc989f5886196ad

See more details on using hashes here.

File details

Details for the file credtools-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: credtools-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for credtools-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ada64f3d13ee238f02c2353afff5e47df3029faf004760e99bb954be7c7c3e6
MD5 665de150bf3e990742aac6e71814bc5b
BLAKE2b-256 60d79fd383e0874abf513484daf911c1a5d4df17add8bb21492646403f8a0a96

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