Skip to main content

Ultra-fast GPU-enabled Bayesian colocalisation

Project description

gpu-coloc

gpu-coloc is a GPU-accelerated Bayesian colocalization implementation (COLOC), delivering identical results to R's coloc.bf_bf approximately 1000 times faster.

Citation

If you use gpu-coloc, please cite: (citation placeholder)

Installation

Install via pip (Python ≥3.12):

pip install gpu-coloc

Verify Installation

To confirm installation, clone this repository:

git clone https://github.com/mjesse-github/gpu-coloc
cd gpu-coloc
bash test.sh

This creates an example/ directory containing an example_results.tsv file.

Workflow

Note: Paths assume gpu-coloc is in the working directory; adjust paths if necessary.

Variant Naming Convention

Variants must follow the naming format: chr[chromosome]_[position]_[ref]_[alt]. Ensure renaming is completed before Step 1. Use chromosome X, not 23.

1. Prepare Signals and Summary Files

  • Signal Files: Save signals as [signal].pickle, containing variants and their log Bayes Factors (lbf).

Example format:

variant	chrX_153412224_C_A	chrX_153412528_C_T	...
lbf	-0.060991	-1.508802	...
  • Summary File: Tab-separated, structured as:
signal	chromosome	location_min	location_max	signal_strength	lead_variant
QTD000141_ENSG00000013563_L1	X	153412224	155341332	12.1069377174147	chrX_154403855_T_G
...

Naming examples:

  • Summary: gwas_summary.tsv
  • Signals directory: gwas_signals/[signal].pickle

See scripts in summary_and_signals_examples/ for reference; modifications may be necessary.

2. Format Data

gpu-coloc --format --input [path_to_signals] --input_summary [summary_file] --output [output_folder]

3. Run Colocalization

gpu-coloc coloc.py --run --dir1 [formatted_dataset_1] --dir2 [formatted_dataset_2] --results [results_output] --p12 1e-6 --H4 0.8

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

gpu_coloc-0.1.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

gpu_coloc-0.1.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file gpu_coloc-0.1.2.tar.gz.

File metadata

  • Download URL: gpu_coloc-0.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gpu_coloc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fcfed5e2091454a8dfb1c86410edbd38c3f1fea7940ddee6da24f6fd1eae6662
MD5 a6ab61b651e7daccdee41b3933c08f9b
BLAKE2b-256 0da2a7853f2f31faf71b57f0d151e3c1e9f871e773e46188906904374efb9124

See more details on using hashes here.

File details

Details for the file gpu_coloc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gpu_coloc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gpu_coloc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c383b822b4707b48e79820ca25d783212f4d08d90122c343a2fce4d24a4b498
MD5 a955d8839346fbaa16f7dca537c04af7
BLAKE2b-256 53d38a20900f71a4f1a4ecebb09bf7d29423b33ac3c47098d6ba58d21d0a14c0

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