External tools tl.external#
Wrappers around external genetics tools. Most of these shell out to a command-line tool that has to be installed separately (e.g. PLINK, MAGMA, LDSC, TensorQTL, SAIGE-QTL) — see each tool’s own documentation for installation instructions.
eQTL mapping (jaxQTL / TensorQTL)#
|
Run cis- or trans-eQTL mapping using jaxQTL on donor-level genotype and aggregated expression data. |
|
Read jaxQTL output TSV file. |
|
Run cis- or trans-QTL mapping using TensorQTL on donor-level aggregated expression and genotype data. |
|
Read TensorQTL result files. |
SAIGE-QTL#
|
Create group file for set-based rare variant tests. |
|
Run eQTL mapping using SAIGE-QTL with flexible step execution. |
|
Read SAIGE-QTL results |
MixMIL#
|
Train a MixMIL model on donor-level data with flexible covariate encoding. |
LD and principal components#
|
Estimate LD patterns using PLINK. |
|
Run PLINK to calculate genetic PCs using the |
LD score regression (S-LDSC)#
|
Munge (clean and standardize) GWAS summary statistics for LDSC analysis |
|
Create a binary or continuous S-LDSC annotation file from a PLINK bimfile. |
Create a binary or continuous S-LDSC annotation file from a DonorData object. |
|
Estimate LD scores from PLINK bfile (works with any bfile, including 1000G) |
|
Estimate LD scores from DonorData object |
|
|
Compute LD scores with cell-type-specific annotations from PLINK bfile |
|
Compute LD scores with cell-type-specific annotations from DonorData object |
|
Estimate SNP heritability using LD Score regression |
Estimate cell-type-specific heritability using LD Score regression. |
|
Estimate genetic correlation using LD Score regression |
|
|
Generate a gene coordinate file for S-LDSC analysis from Ensembl BioMart. |
|
Generate cell-type-specific gene sets for S-LDSC analysis. |
Download and cache a MAGMA-compatible gene location file from Ensembl BioMart. |
|
|
Preprocess single-cell data for S-LDSC cell-type-specific analysis. |
MAGMA#
|
Complete MAGMA pipeline: prepare inputs, annotate SNPs, and run gene analysis. |
|
Run MAGMA Step I — annotate SNPs to genes. |
|
Run MAGMA Step II — gene-level association analysis. |
|
Run MAGMA Step III — gene-set analysis (GSA). |
|
Run MAGMA Step III — gene property analysis (GPA). |
|
|
Load a mapping TSV with columns: ensembl_gene_id, entrez_id. |
|
|
Convert a genes × cell-types score DataFrame to MAGMA GMT format. |
|
Convert a genes × cell-types score DataFrame to a MAGMA gene covariate file. |
gsMap#
|
Convert GWAS summary statistics into gsMap-compatible format. |
|
Load gsMap output files into DataFrames. |
sc-linker gene programs and heritability#
|
Compute cell-type gene programs by differential expression (one vs rest). |
Compute disease-progression gene programs. |
|
|
Compute NMF cellular process programs (single healthy tissue). |
Compute joint NMF programs across healthy and disease tissue. |
|
|
Joint NMF decomposition for paired healthy / disease single-cell data. |
|
Compute the E-score: enrichment of a program minus the all-coding control. |
|
Run S-LDSC |
Compute LD scores for all sc-linker annotations. |
|
Parse all S-LDSC .log files from a sc-linker run into a DataFrame. |
|
Download sc-linker reference files. |
|
Download the sc-linker enhancer-gene reference files from GCS. |
|
|
Load Roadmap enhancer-gene links from the combined all-tissue file. |
|
Load ABC model enhancer-gene predictions from the combined all-tissue file. |
Load gene TSS/TES coordinates for the 100 kb window S2G strategy. |
|
Convert gene scores to ABC_Road bedgraphs (Roadmap ∪ ABC strategy). |
|
Convert gene scores to 100kb window bedgraphs. |
|
|
Full Step 2: gene scores → bedgraphs → per-chromosome SNP annotations. |
Convert a bedgraph file to an S-LDSC annotation file (.annot.gz). |
|
Check whether the LDSC installation has the pandas column-sort bug and patch it. |
scDRS and seismic (GWAS x single-cell disease relevance)#
|
Run scDRS (single-cell disease-relevance score) analysis on AnnData. |
|
Run seismic analysis to link cell types with GWAS traits using single-cell data. |
|
Run the sparse-torch Seismic backend end to end. |
Compute Seismic cell-type specificity scores from a sparse expression matrix. |
|
Closed-form univariate regression of GWAS z-scores against a gene-level covariate. |
scPRS#
|
Prepare scPRS input data from pre-computed PLINK score files. |
Generate the PLINK shell commands for all cells without running them. |
|
|
Prepare per-cell GWAS files and write a SLURM array job for the PLINK C+T step. |
Identify disease-relevant cells from scPRS model weights. |
|
|
End-to-end scPRS pipeline. |
LIVI#
Donor-level representation learning on paired genotype/expression data. See the Tutorial: Donor Effect Decomposition with LIVI using cellink tutorial for a full walkthrough.
|
Manages access to the LIVI package. |
|
Configure the global LIVI runner. |
Return the global |
|
|
Train a LIVI model on single-cell RNA-seq data. |
|
Extract latent factors from a trained LIVI model. |
Run genetic association testing on LIVI donor embeddings. |
|
|
Save |
|
Load TSV files written by |
train_livi_annbatch, build_annbatch_collection, read_g_from_dd_store, CisGenotype,
LIVICisBatchAdapter and AnnbatchLIVIDataModule provide an annbatch-streamed training
path for datasets too large to fit in memory. They require the extra torch,
pytorch_lightning and annbatch dependencies.