Skip to content
YangLabHKUSTPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MRCAT

A reliable AI assistant for Mendelian randomization

Quick start · Demo · Paper experiments

MRCAT searches for GWAS studies, prepares exposure and outcome data, runs MR analyses and diagnostics, and writes reports from the saved results. Review the plan, inspect code and plots, and ask follow-up questions in one workspace.

MRCAT workspace showing a BMI–type 2 diabetes analysis

The MRCAT workspace showing study setup, an analysis plan and interactive results for BMI and type 2 diabetes.

Demo

See the BMI → T2D tutorial for example questions and data requirements.

Quick start

1. Install

Requires Linux, Conda and Git. The environment installs Python 3.11 and R.

git clone https://github.com/YangLabHKUST/MRCAT.git
cd MRCAT
conda env create -f environment.yml
conda activate mrcat
Rscript scripts/install_r_dependencies.R

Scientific analysis also requires GWAS inputs and Reference data.

2. Configure a model

Copy the settings template once, or edit your existing .env:

cp .env.example .env

For DeepSeek, set these entries in .env:

LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=your_api_key_here
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-flash

Keep .env private. See model configuration for other providers, model limits and troubleshooting.

3. Configure OpenGWAS access

For OpenGWAS study searches, authenticated downloads and online LD clumping, sign in to the OpenGWAS account page and generate a JWT. Set it in the same .env file:

OPENGWAS_JWT=your_opengwas_token_here

Paste only the token, without a Bearer prefix. This is separate from your model API key. Tokens currently expire after 14 days; generate a replacement, update .env and restart MRCAT when needed (OpenGWAS authentication).

Local GWAS files can still require this token if the analysis uses online LD clumping. A workflow using local inputs and local PLINK clumping, with no OpenGWAS requests, does not need it. Viewing the included recording does not need it either. See OpenGWAS configuration for details and troubleshooting.

4. Start and try a question

mrcat-web --port 17869

Open http://127.0.0.1:17869 on the same machine. Select your provider under Settings, then choose New Chat. For remote or shared access, see the deployment guide.

What information should I prepare for an MR analysis of BMI and type 2 diabetes?

To inspect the included recording without an API key or reference data, choose Examples in the sidebar.

Reference data

GWAS inputs and reference panels are separate from the software installation. The prepared reference archives are not yet publicly downloadable; see data preparation for local installation, requirements and sources.

Paper experiments

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages