Skip to main content

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

Metadata

Release files for credtools 0.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for credtools 0.9.4
File Size Uploaded
credtools-0.9.4.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for credtools 0.9.4
File Interpreter ABI Platform
credtools-0.9.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 MB

Release files / credtools-0.9.4.tar.gz

Download URL credtools-0.9.4.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
3b11a1f9fb4a3a28d8ea45ae82b5cf2c4c7acae77bb60fd6224cf9feb1e16b06
BLAKE2b-256 checksum
How to use checksums
100fffaabf7cf633923eca6eaaa2fe51dea28014c32026cbad9ff18ed189a90a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / credtools-0.9.4-py3-none-any.whl

Download URL credtools-0.9.4-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
110524fc2b7fb7e586122bcc73ba2242773e6ec22bb824afd32c6d0e0910bb1c
BLAKE2b-256 checksum
How to use checksums
53669a91ca5f1146ca42fdc174c591ecd55158b99031b994c55f3a6dcee9adac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

This release

0.9.4 This release

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.10

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.0

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.35

1 release file

0.0.34

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.28

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page