Rare disease rnaseq

From ClawBio/ClawBio · View interactive version

Rare disease rnaseq is an AI agent skill from the GitHub repository ClawBio/ClawBio. Blood RNA-seq expression-outlier detection for rare-disease diagnostics. Cases scored against a control reference panel; outliers ranked and filtered by a haploinsufficient disease-gene panel.

How to use this skill

Skill file

🩸 Rare-Disease Blood RNA-seq Outlier Detection

Reproduces the diagnostic principle of the Genomics England NGRL paper (Blood-based RNA-Seq of 5,412 individuals, medRxiv 2026.03.19.26348811). For each case sample, scores per-gene expression against a control reference panel and flags candidates falling in a curated dosage-sensitive disease-gene panel.

When To Use

Method

Per-gene robust outlier scoring on log2(CPM+1):

  1. Library-size normalise (CPM), log-transform
  2. For each gene: compute median and MAD across the control panel
  3. For each case-gene cell: modified z = 0.6745 (x āˆ’ median) / MAD
  4. Flag |z| ≄ threshold (default 3) and gene in disease panel
  5. Rank by |z|, separate down-outliers (haploinsufficiency-consistent) from up-outliers

This implements the diagnostic principle of OUTRIDER (per-gene outlier vs control panel) without the autoencoder, so it runs in seconds with no R/Bioconductor stack. For clinical-grade calls swap to the full DROP pipeline (gagneurlab/drop) which adds OUTRIDER's denoising autoencoder, FRASER2 splicing outliers, and confounder correction. The skill's I/O contract is the same so the upgrade is drop-in.

Input Contract

Output Structure

rdoutlier_report/
ā”œā”€ā”€ report.md                     # per-case candidate diagnoses + clinical narrative
ā”œā”€ā”€ result.json                   # standard ClawBio envelope
ā”œā”€ā”€ figures/
│   └── case_outlier_heatmap.png  # z-scores across cases Ɨ top genes
ā”œā”€ā”€ tables/
│   ā”œā”€ā”€ outlier_calls.csv         # all flagged outliers with z-score, direction, mechanism
│   └── per_gene_stats.csv        # control median + MAD per gene
ā”œā”€ā”€ demo_data/                    # --demo only: the synthetic counts, cases and controls
└── reproducibility/
    ā”œā”€ā”€ commands.sh               # replays the run into this directory
    ā”œā”€ā”€ environment.yml
    ā”œā”€ā”€ inputs.json               # SHA-256 of the panel and, for real runs, each input file
    └── checksums.sha256          # every output, relative to this directory

Demo

python clawbio.py run rdoutlier --demo

Generates 100 synthetic Gulf-ancestry control samples + 2 cases with injected outliers (FBN1 down, NF1 up) across a 200-gene panel. Demonstrates the diagnostic loop end-to-end in seconds.

Production Path (Sidra / QBB Reference)

| Component | Demo | Production |

|-----------------------|-------------------------------|-----------------------------------------------|

| Aligner + quantifier | none (synthetic counts) | STAR + featureCounts (or Salmon) |

| Outlier algorithm | robust per-gene z-score | OUTRIDER autoencoder + FRASER2 splicing |

| Control panel | 100 synthetic samples | QBB nā‰ˆ12K PAXgene blood RNA-seq |

| Confounder correction | none | DROP pipeline (RIN, batch, hidden factors) |

| Disease panel | 50 haploinsufficient genes | ClinGen haploinsufficient + PanelApp |

| Return-of-result loop | report.md | Sidra MDT reflex from WGS-negative referrals |

Safety

Disclaimer

ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.