Agent skill · AI & Agents

bio-causal-genomics-genomic-sem

Fits structural equation models to GWAS summary statistics using GenomicSEM (Grotzinger 2019), including common-factor models, confirmatory factor models, ESEM, common-factor GWAS with Q_SNP heterogeneity, multivariate Wald tests, and stratified GenomicSEM partitioned heritability. Reconciles results against MTAG multi-trait analysis. Handles sample overlap via the LDSC sampling-covariance matrix, identifies and resolves Heywood cases, and verifies model fit with CFI / RMSEA. Use when modeling latent genetic architecture across correlated traits, running multivariate GWAS on a shared factor, d

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeships scriptsNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill genomic-sem --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 32 KB
Bundled scripts: yes
Path: skills/bioskills/genomic-sem/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

## Version Compatibility Reference examples tested with: GenomicSEM 0.0.5+ (GitHub `GenomicSEM/GenomicSEM`), lavaan 0.6-17+, LDSC v1.0.1+ (Python 3; prefer `abdenlab/ldsc-python3` v2.0.0 -- `belowlab/ldsc` v3.0.1 README states the CLI is broken; Docker `jtb114/ldsc:latest` is the belowlab fallback), baselineLD_v2.2 annotations (alkesgroup.broadinstitute.org/LDSCORE), MTAG 1.0.8+ (Python; `JonJala/mtag`), R 4.4+. Before using code patterns, verify installed versions match. If versions differ: - R: `packageVersion('GenomicSEM')` then `?ldsc`, `?commonfactor`, `?usermodel`, `?commonfactorGWAS` - Python (LDSC, MTAG): `<tool>.py -h` and inspect the source under `ldsc/` or `mtag/` GenomicSEM is GitHub-only (never on CRAN). If `ldsc()` or `usermodel()` throws an error about lavaan syntax or non-positive-definite covariance, introspect the installed API (`getMethod('ldsc')`) and adapt rather than retrying. # Genomic SEM **"Model the latent genetic architecture across several correlated GWAS"** -> Treat each GWAS as a measured indicator of one or more latent genetic factors and fit a structural equation model to the LDSC-derived genetic covariance matrix S and its sampling covariance V (Gro

What's inside
Steps it walks through
  1. Version Compatibility
  2. Statistical Model Taxonomy
  3. MTAG vs GenomicSEM Common-Factor GWAS
  4. Decision Tree by Scenario
  5. Per-Method Failure Modes
  6. Heywood case (negative residual variance)
  7. Sample overlap mis-specified
  8. QSNP not reported in commonfactorGWAS
  9. Trait inclusion under heterogeneous factor structure
  10. MTAG MaxFDR > 5%
  11. Non-positive-definite VLD matrix
  12. Model Fit Diagnostics
  13. Quantitative Thresholds
  14. Standard Workflow
Ships with 3 files
  • examples/genomic_sem_commonfactor.R
  • examples/mtag_pipeline.sh
  • usage-guide.md
Commands it runs
MTAG CLI (Python)
python mtag.py \
Check MaxFDR per trait
grep -i maxfdr mtag_results.log
Each per-trait MTAG file: mtag_results_trait<k>.txt
LDSC python3 fork (GenomicSEM input format). belowlab/ldsc v3.0.1 broke the
for a working CLI. Docker jtb114/ldsc:latest is the belowlab fallback.
git clone https://github.com/abdenlab/ldsc-python3.git
cd ldsc-python3 && pip install -r requirements.txt
MTAG
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-causal-genomics-genomic-sem skill do?

Fits structural equation models to GWAS summary statistics using GenomicSEM (Grotzinger 2019), including common-factor models, confirmatory factor models, ESEM, common-factor GWAS with Q_SNP heterogeneity, multivariate Wald tests, and stratified GenomicSEM partitioned heritability. Reconciles results against MTAG multi-trait analysis. Handles sample overlap via the LDSC sampling-covariance matrix, identifies and resolves Heywood cases, and verifies model fit with CFI / RMSEA. Use when modeling latent genetic architecture across correlated traits, running multivariate GWAS on a shared factor, d

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill genomic-sem --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going