[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73HA4KCGGYBYQ18E939TTW6":3,"skill-same:01M73HA4KCGGYBYQ18E939TTW6":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73HA4KCGGYBYQ18E939TTW6","mouse-phenome-database",null,"Retrieve mouse phenotype data from the Jackson Laboratory Mouse Phenome Database (MPD) via its REST API. Browse 520+ projects, look up per-project measure metadata, pull strain-level means (raw or LS-mean adjusted) and per-animal values, find measures by MP\u002FVT ontology terms, and resolve strain nomenclature or gene coordinates. Use for QTL support, cross-strain comparison, mouse model selection, and ontology-driven phenotype discovery. Use monarch-database for disease-gene-phenotype knowledge graphs; ensembl-database for mouse genome annotations.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fmouse-phenome-database\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"mouse-phenome-database\"\ndescription: \"Retrieve mouse phenotype data from the Jackson Laboratory Mouse Phenome Database (MPD) via its REST API. Browse 520+ projects, look up per-project measure metadata, pull strain-level means (raw or LS-mean adjusted) and per-animal values, find measures by MP\u002FVT ontology terms, and resolve strain nomenclature or gene coordinates. Use for QTL support, cross-strain comparison, mouse model selection, and ontology-driven phenotype discovery. Use monarch-database for disease-gene-phenotype knowledge graphs; ensembl-database for mouse genome annotations.\"\nlicense: \"CC-BY-4.0\"\n---\n\n# mouse-phenome-database\n\n## Overview\n\nThe Mouse Phenome Database (MPD), maintained at the Jackson Laboratory, catalogs standardized phenotype measurements across inbred, recombinant inbred (e.g., BXD), and Collaborative Cross \u002F Diversity Outbred mouse panels. It aggregates 520+ projects spanning metabolic, cardiovascular, behavioral, hematological, and immunological traits. The REST API at `https:\u002F\u002Fphenome.jax.org\u002Fapi` is free, requires no authentication, and is documented at \u003Chttps:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fapi>. MPD measurement IDs (`measnum`) are project-scoped 5-digit integers — there is no global \"measnum 10001 = body weight\" mapping; valid measnums must be discovered per project via the `measureinfo` endpoint.\n\n## When to Use\n\n- Selecting inbred strains with extreme phenotypes (highest\u002Flowest fasted glucose, body weight, heart rate, etc.) as experimental models\n- Pulling individual-animal data from BXD \u002F CC \u002F DO panels for QTL mapping with R\u002Fqtl2 or similar tools\n- Comparing strain means and variance across metabolic, behavioral, or cardiovascular measures for genetic background studies\n- Finding MPD projects that measure a trait of interest using ontology terms (MP, VT, MA) or free-text descriptions\n- Validating mouse strain nomenclature (canonical JAX names ↔ stock numbers ↔ MGI IDs) before submitting orders or analyses\n- Looking up coordinates and annotations for mouse genes in the MPD\u002FMGI cross-reference\n- Use **omics-plotting** SKILL to render strain-mean bar charts and strain × measure heatmaps from the query results\n- Use `monarch-database` instead for disease-gene-phenotype knowledge graphs (HPO ↔ MP ↔ disease)\n- Use `ensembl-database` instead for transcript-level mouse gene annotations and variant consequence prediction\n\n## Prerequisites\n\n- **Python packages**: `requests`, `pandas`, `matplotlib`\n- **Data requirements**: a project symbol (e.g., `Jaxwest1`, `Auwerx1`) or a measnum (e.g., `15101`); strain names follow JAX canonical nomenclature (e.g., `C57BL\u002F6J`, `DBA\u002F2J`)\n- **Environment**: internet connection; no API key required\n- **Rate limits**: no published hard limit; keep bursts under ~5 requests\u002Fsecond and add `time.sleep(0.3)` between requests in loops\n\n```bash\npip install requests pandas matplotlib\n```\n\n## Quick Start\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# 1) Pick a project (Jaxwest1 — cardiovascular phenotyping on inbred panel)\nr = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fstrains\", timeout=30)\nstrains = r.json()[\"strains\"]\nprint(f\"Jaxwest1: {len(strains)} strains tested\")\n\n# 2) Discover its measures\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002FJaxwest1\", timeout=30)\nmeasures = r.json()[\"measures_info\"]\nprint(f\"Jaxwest1 measures: {len(measures)}; first: measnum={measures[0]['measnum']} \"\n      f\"varname={measures[0]['varname']}  ({measures[0]['descrip']}, {measures[0]['units']})\")\n\n# 3) Pull strain means for heart rate (varname=HR, measnum=15101)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F15101\", timeout=30)\nsm = r.json()[\"strainmeans\"]\nprint(f\"\\nHeart rate strain means: {len(sm)} rows  (one per strain × sex)\")\ntop = sorted(sm, key=lambda x: x[\"mean\"], reverse=True)[:5]\nfor s in top:\n    print(f\"  {s['strain']:\u003C20}  sex={s['sex']}  mean={s['mean']:.0f} {s.get('varname','')}  n={s['nmice']}\")\n```\n\n## Core API\n\n### Module 1: Browse Projects — `\u002Fprojects`\n\nLists all MPD projects with full metadata. Filter via `investigator`, `projsym`, `projid`, `mpdsector`, `largecollab`, `panelsym`. Use `\u002Fproject_filters\u002F{filtername}` to see the allowed values of `mpdsector`, `largecollab`, or `panelsym` before filtering.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# List allowed panel symbols (e.g., BXD, CC, DO)\nfilters = requests.get(f\"{MPD}\u002Fproject_filters\u002Fpanelsym\", timeout=30).json()\nprint(f\"Available panels ({filters['count']}):\", [t['term'] for t in filters['terms']][:10])\n\n# All projects in the BXD recombinant inbred panel\nr = requests.get(f\"{MPD}\u002Fprojects\", params={\"panelsym\": \"BXD\"}, timeout=30)\nprojects = r.json()[\"projects\"]\nprint(f\"BXD projects: {len(projects)}\")\ndf = pd.DataFrame([{\n    \"projsym\": p[\"projsym\"],\n    \"pi\": p.get(\"pistring\", \"\")[:40],\n    \"nstrains\": p.get(\"nstrains\"),\n    \"ages\": p.get(\"ages\"),\n    \"sector\": p.get(\"mpdsector\"),\n    \"title\": (p.get(\"title\") or \"\")[:60],\n} for p in projects])\nprint(df.head(10).to_string(index=False))\n```\n\n```python\n# Filter by MPD sector — komp, pheno, qtla, snp, onestrain, phenoarchive\nr = requests.get(f\"{MPD}\u002Fprojects\", params={\"mpdsector\": \"qtla\"}, timeout=30)\nqtl_projects = r.json()[\"projects\"]\nprint(f\"QTL-archive projects: {len(qtl_projects)}\")\nfor p in qtl_projects[:5]:\n    print(f\"  {p['projsym']:\u003C15} panel={p.get('panelsym') or '--':\u003C6} nstrains={str(p.get('nstrains') or '--'):>4}  {(p.get('title') or '')[:55]}\")\n```\n\n### Module 2: Project Detail — `\u002Fprojects\u002F{projsym}\u002F...`\n\nEach project has sub-resources for its dataset (CSV of every animal × every measure), the strain panel it tested, the publications it produced, and (for QTL projects) the genetic markers used.\n\n```python\nimport requests, io, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Full per-animal dataset as CSV (default). Use json=yes for JSON.\nr = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fdataset\", timeout=60)\ndf = pd.read_csv(io.StringIO(r.text))\nprint(f\"Jaxwest1 dataset: {df.shape[0]} animals × {df.shape[1]} columns\")\nprint(df.columns[:12].tolist())\nprint(df[[\"strain\", \"sex\", \"animal_id\", \"HR\", \"QRS\", \"bw\"]].head(5).to_string(index=False))\n```\n\n```python\n# Strains tested in a project + publication list\nstrains = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fstrains\", timeout=30).json()\nprint(f\"Jaxwest1 strains ({strains['count']}):\")\nfor s in strains[\"strains\"][:5]:\n    print(f\"  {s['strainname']:\u003C20}  stock={s['stocknum']}  vendor={s['vendor']}\")\n\npubs = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fpublications\", timeout=30).json()\nprint(f\"\\nPublications: {pubs['count']}\")\n```\n\n### Module 3: Measure Discovery — `\u002Fpheno\u002Fmeasureinfo\u002F{selector}`\n\nThis is the canonical way to discover valid `measnum` values. The selector is either a project symbol (returns all measures in that project) or a measnum (returns metadata for one measure).\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# All measures in the Jaxwest1 cardiovascular project\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002FJaxwest1\", timeout=30)\nmeasures = r.json()[\"measures_info\"]\ndf = pd.DataFrame([{\n    \"measnum\": m[\"measnum\"],\n    \"varname\": m[\"varname\"],\n    \"descrip\": m[\"descrip\"],\n    \"units\": m.get(\"units\"),\n    \"sex\": m.get(\"sextested\"),\n    \"age\": m.get(\"ageweeks\"),\n} for m in measures])\nprint(f\"Jaxwest1 has {len(df)} measures\")\nprint(df.head(10).to_string(index=False))\n```\n\n```python\n# Single-measure metadata lookup (protocol + dimensional details)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F15101\", timeout=30).json()\nm = r[\"measures_info\"][0]\nprint(f\"measnum {m['measnum']} ({m['varname']}): {m['descrip']}\")\nprint(f\"  units: {m.get('units')}\")\nprint(f\"  project: {m.get('projsym')}  panel: {m.get('panelsym') or m.get('paneldesc')}\")\nprint(f\"  sex tested: {m.get('sextested')}  age: {m.get('ageweeks')}\")\nprint(f\"  method:  {(m.get('method') or '')[:120]}\")\n```\n\n### Module 4: Strain Means — `\u002Fpheno\u002Fstrainmeans\u002F{selector}`\n\nReturns strain × sex summary statistics. The selector takes a project symbol (all strain means for the project) or one-or-more comma-separated measnums. Each row contains `measnum, varname, strain, strainid, sex, mean, sd, sem, cv, minval, maxval, nmice, zscore`.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Strain means for one measure (heart rate, measnum=15101 from Jaxwest1)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F15101\", timeout=30)\nsm = pd.DataFrame(r.json()[\"strainmeans\"])\nprint(f\"Rows: {len(sm)}  ({sm['strain'].nunique()} strains × {sm['sex'].nunique()} sexes)\")\n\n# Rank strains by male HR\nmale = sm[sm[\"sex\"] == \"m\"].sort_values(\"mean\", ascending=False)\nprint(male[[\"strain\", \"mean\", \"sd\", \"sem\", \"nmice\", \"zscore\"]].head(8).to_string(index=False))\n```\n\n```python\n# Optional: model-adjusted means (lsmeans) account for covariates fit in MPD's models.\n# Use lsmeans when comparing strains across cohorts within a project.\nr = requests.get(f\"{MPD}\u002Fpheno\u002Flsmeans\u002FJaxwest1\", timeout=30).json()\nprint(\"LS-mean measures available for Jaxwest1:\", r.get(\"ls_measures\", [])[:10])\n```\n\n### Module 5: Per-Animal Values — `\u002Fpheno\u002Fanimalvals\u002F{measnum}`\n\nRaw per-animal observations for one measure. Each row carries `animal_id, animal_projid, measnum, projsym, sex, stocknum, strain, strainid, value, varname, zscore`. Use this for QTL mapping, mixed-effects modeling, or distribution analysis.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Per-animal heart rate values\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fanimalvals\u002F15101\", timeout=30)\nad = pd.DataFrame(r.json()[\"animaldata\"])\nprint(f\"Animals measured: {len(ad)}\")\nprint(ad[[\"animal_id\", \"strain\", \"sex\", \"value\", \"zscore\"]].head(8).to_string(index=False))\n\n# Compare male-only strain distributions\nmale = ad[ad[\"sex\"] == \"m\"]\nstats = male.groupby(\"strain\")[\"value\"].agg([\"mean\", \"std\", \"count\"]).round(2)\nprint(f\"\\nMale HR by strain (top 5 by mean):\")\nprint(stats.sort_values(\"mean\", ascending=False).head(5))\n```\n\n### Module 6: Ontology-Based Measure Discovery — `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}`\n\nFind every MPD measure annotated to a Mammalian Phenotype (MP), Vertebrate Trait (VT), or Mouse Anatomy (MA) ontology term. Optional `this_term_only=yes` disables descendant-term expansion; `omit_baseline=yes` filters out baseline measures; `collapse_series=yes` collapses repeated time-points.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# MP:0001262 = \"decreased body weight\"\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasures_by_ontology\u002FMP:0001262\",\n                 params={\"omit_baseline\": \"yes\", \"collapse_series\": \"yes\"},\n                 timeout=30).json()\nprint(f\"Measures mapped to MP:0001262 ('{r['ontology_terms'][0]['descrip']}'): {r['count']}\")\nif r[\"count\"]:\n    df = pd.DataFrame(r[\"measures\"])\n    print(df[[\"measnum\", \"varname\", \"descrip\", \"projsym\"]].head(8).to_string(index=False))\nelse:\n    print(\"(no direct measures; consider a broader parent term)\")\n```\n\n### Module 7: Strain Nomenclature — `\u002Fstraininfo`\n\nValidate and normalise strain names. Accepts `name`, `stocknum`, or `mginum` query params. Returns both `jaxinfo[]` (JAX availability\u002Fnomenclature) and `mpdinfo[]` (MPD's own metadata, including how many projects test this strain).\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Validate C57BL\u002F6J — note `requests` URL-encodes the slash automatically in params\nr = requests.get(f\"{MPD}\u002Fstraininfo\", params={\"name\": \"C57BL\u002F6J\"}, timeout=30).json()\njax = r[\"jaxinfo\"][0]\nmpd = r[\"mpdinfo\"][0]\nprint(f\"JAX:  {jax['nomenclature']}  stock={jax['stocknum']}  status={jax['avl_status']}\")\nprint(f\"MPD:  longname={mpd['longname']}  type={mpd['straintype']}  \"\n      f\"projects={mpd['nproj']}  snp_projects={mpd['nsnpproj']}  MGI={mpd['mginum']}\")\n```\n\n### Module 8: Gene Info — `\u002Fgeneinfo\u002F{symbol}`\n\nMouse-gene coordinates (GRCm39, in bp), strand, MGI ID, and a short description. Note the response key is the literal string `\"gene info\"` (with a space).\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\nr = requests.get(f\"{MPD}\u002Fgeneinfo\u002FLep\", timeout=30).json()\nfor g in r[\"gene info\"]:\n    print(f\"{g['descrip']}  chr{g['chrom']}:{g['startbp']:,}–{g['endbp']:,} ({g['strand']})\")\n    print(f\"  type: {g['featuretype']}  MGI: {g['mginum']}  cM: {g['centimorgan']}\")\n```\n\n## Key Concepts\n\n### Measnums Are Project-Scoped, Not Global\n\nEvery `measnum` belongs to exactly one project. `15101` is \"heart rate\" only within Jaxwest1; the same physiological trait in another project has a different measnum (e.g., `35702` for body weight in Lightfoot1). Never hardcode measnums for a trait — always resolve them by:\n\n1. Finding the project: `GET \u002Fprojects?panelsym=...` or `GET \u002Fprojects?investigator=...`\n2. Listing its measures: `GET \u002Fpheno\u002Fmeasureinfo\u002F{projsym}`\n3. Picking the right `varname` \u002F `descrip` \u002F `units` triple from the response\n\nOr go the other way and discover measures by ontology term first (Module 6).\n\n### Selectors: Projsym vs Measnum\n\nMost `\u002Fpheno\u002F*` endpoints take a \"selector\" path parameter that's overloaded:\n\n| Endpoint | Accepts as selector |\n|----------|---------------------|\n| `\u002Fpheno\u002Fstrainmeans\u002F{selector}` | projsym (e.g., `Jaxwest1`) **or** one or more comma-separated measnums |\n| `\u002Fpheno\u002Flsmeans\u002F{selector}` | same |\n| `\u002Fpheno\u002Fmeasureinfo\u002F{selector}` | same |\n| `\u002Fpheno\u002Fanimalvals\u002F{measnum}` | measnum only (use measureinfo to discover) |\n| `\u002Fpheno\u002Fanimalvals\u002Fseries\u002F{measnum}` | for timecourse\u002Fdose-response series |\n\nIf you pass an unrecognised selector you get a 400 JSON response (`{\"error\": \"...selector arg must either be measure IDs or a project symbol\"}`), not an HTML 404 — those are diagnostic and worth surfacing.\n\n### Strain Means vs LS-Means\n\n- `strainmeans` are unadjusted: simple per-strain × per-sex arithmetic means of the raw animal values.\n- `lsmeans` are model-adjusted least-squares means from MPD's pre-fit ANOVA-style models (accounting for cohort, batch, or covariate effects when present).\n\nFor cross-project comparisons or analyses sensitive to batch effects, prefer `lsmeans` when available. For simple ranking and exploratory work, `strainmeans` is fine.\n\n### MPD Sectors (`mpdsector` filter)\n\n| Sector | Content |\n|--------|---------|\n| `pheno` | Standard inbred-strain phenotyping projects |\n| `qtla` | QTL Archive — historical mapping studies with markers |\n| `komp` | Knockout Mouse Project (KOMP \u002F JaxLIMS) data |\n| `snp` | SNP genotype panels (use `\u002Fsnpdata`) |\n| `phenoarchive` | Archived legacy phenotype projects |\n| `onestrain` | Single-strain deep phenotyping |\n\nDiscover the live list any time with `GET \u002Fproject_filters\u002Fmpdsector`.\n\n## Common Workflows\n\n### Workflow 1: Pick a Trait → Find a Project → Plot Strain Means\n\n**Goal**: From \"I want to compare heart rate across inbred strains\" → land on real data and produce a ranked barplot.\n\n```python\nimport requests, pandas as pd, time\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# 1) Find candidate projects whose name\u002Fdescription hints at the trait\nprojects = requests.get(f\"{MPD}\u002Fprojects\", timeout=30).json()[\"projects\"]\ncandidates = [p for p in projects\n              if any(kw in (p.get(\"title\") or \"\").lower()\n                     for kw in [\"cardiovascular\", \"heart\", \"ekg\", \"ecg\"])]\nprint(f\"Candidate cardiovascular projects: {len(candidates)}\")\nfor p in candidates[:5]:\n    print(f\"  {p['projsym']:\u003C15}  nstrains={str(p.get('nstrains') or '--'):>3}  {(p.get('title') or '')[:60]}\")\n\n# 2) Inspect measures for the chosen project\nprojsym = \"Jaxwest1\"\nmi = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F{projsym}\", timeout=30).json()[\"measures_info\"]\nhr = next(m for m in mi if m[\"varname\"] == \"HR\")\nprint(f\"\\nPicked: {projsym} measnum={hr['measnum']} varname={hr['varname']} ({hr['descrip']}, {hr['units']})\")\n\n# 3) Pull strain means, plot male strains ranked\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{hr['measnum']}\", timeout=30).json()[\"strainmeans\"])\nmale = sm[sm[\"sex\"] == \"m\"].sort_values(\"mean\", ascending=False).reset_index(drop=True)\nmale.to_csv(\"mpd_strain_means.csv\", index=False)\nprint(f\"Strain means (male): {len(male)} strains -> mpd_strain_means.csv\")\n# Render with the omics-plotting SKILL (`skills\u002Fdata-visualization\u002Fomics-plotting\u002FSKILL.md`) \"Box \u002F Violin \u002F Bar\" recipe (bar of mean by strain,\n# yerr=sem) -> figures\u002Fmpd_strain_means.png\n```\n\n### Workflow 2: Per-Animal Data → R\u002Fqtl2 CSV Export\n\n**Goal**: Pull individual animal observations for a measure and shape them into a phenotype file ready for QTL mapping.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\nmeasnum = 15101  # heart rate in Jaxwest1\nmi = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F{measnum}\", timeout=30).json()[\"measures_info\"][0]\nad = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fanimalvals\u002F{measnum}\", timeout=30).json()[\"animaldata\"])\nprint(f\"measnum {measnum}: {mi['varname']} ({mi['descrip']}, {mi['units']}) — {len(ad)} animals\")\n\n# R\u002Fqtl2-ready phenotype CSV: rows = individuals, cols = id + covariates + phenotype\nout = ad[[\"animal_id\", \"strain\", \"sex\", \"value\"]].rename(\n    columns={\"animal_id\": \"id\", \"value\": mi[\"varname\"]}\n)\nout.to_csv(f\"{measnum}_{mi['varname']}_qtl_pheno.csv\", index=False)\nprint(f\"Wrote {measnum}_{mi['varname']}_qtl_pheno.csv  ({len(out)} animals)\")\nprint(out.head().to_string(index=False))\n```\n\n### Workflow 3: Multi-Measure Heatmap Across a Strain Panel\n\n**Goal**: Build a wide-format strain × measure table (z-scored) from one project for comparative visualisation.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\nprojsym = \"Jaxwest1\"\n\n# Pull all strain means for the project in one call\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{projsym}\", timeout=30).json()[\"strainmeans\"])\n\n# Use the precomputed z-scores; pivot to strain × varname (male only for simplicity)\nmale = sm[sm[\"sex\"] == \"m\"]\nwide = male.pivot_table(index=\"strain\", columns=\"varname\", values=\"zscore\", aggfunc=\"mean\")\nprint(f\"Shape: {wide.shape}  (strains × measures)\")\n\n# Subset to a handful of measures with full coverage\nkeep = wide.dropna(axis=1, thresh=int(0.8 * len(wide))).columns[:10]\nwide = wide[keep].dropna()\nprint(f\"After coverage filter: {wide.shape}\")\nwide.to_csv(\"mpd_strain_measure_matrix.csv\")\n# Render with the omics-plotting SKILL (`skills\u002Fdata-visualization\u002Fomics-plotting\u002FSKILL.md`) \"Expression heatmap\" recipe (strain x measure z-score,\n# RdBu_r, center=0) -> figures\u002Fmpd_strain_measure_heatmap.png\n```\n\n## Key Parameters\n\n| Parameter | Endpoint | Default | Range \u002F Options | Effect |\n|-----------|----------|---------|-----------------|--------|\n| `panelsym` | `\u002Fprojects` | — | strain panel symbol (`BXD`, `CC`, `DO`, …) | Filter projects to one mouse panel |\n| `mpdsector` | `\u002Fprojects` | — | `pheno`, `qtla`, `komp`, `snp`, `phenoarchive`, `onestrain` | Filter projects by data sector |\n| `investigator` | `\u002Fprojects`, `\u002Finvestigators` | — | investigator name substring | Filter projects by PI |\n| `csv` | `\u002Fprojects`, `\u002Finvestigators`, `\u002Fprojects\u002F{projsym}\u002Fdataset`, etc. | `no` | `yes` | Return CSV instead of JSON |\n| `json` | `\u002Fprojects\u002F{projsym}\u002Fdataset` | — | `yes` | Return JSON instead of default CSV |\n| `this_term_only` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Disable descendant-term expansion |\n| `omit_baseline` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Drop baseline measures from results |\n| `collapse_series` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Collapse timecourse\u002Fdose series into single entries |\n| `region`, `dataset`, `strains` | `\u002Fsnpdata` | required | genomic region, dataset name, strain CSV | Pull SNP genotypes for region across strains |\n| `name` \u002F `stocknum` \u002F `mginum` | `\u002Fstraininfo` | one required | strain name, JAX stock #, or MGI ID | Validate \u002F look up strain |\n\n## Best Practices\n\n1. **Always discover measnums via `\u002Fpheno\u002Fmeasureinfo\u002F{projsym}` before querying data.** Measnums are project-scoped 5-digit integers; there is no global trait → measnum table. Hardcoding measnums you got from elsewhere will silently 404 or return \"no data\".\n\n2. **Use plural resource paths.** MPD uses `\u002Fprojects`, `\u002Fprojects\u002F{projsym}\u002Fstrains`, `\u002Fprojects\u002F{projsym}\u002Fdataset` — not singular. Old MPD documentation and several third-party wrappers list singular paths that return HTML 404s.\n\n3. **Prefer the project-level dataset CSV for bulk analysis.** When you want every animal × every measure for a project, `GET \u002Fprojects\u002F{projsym}\u002Fdataset` returns a single CSV in one request — much faster than looping `animalvals` per measnum.\n\n4. **Use `lsmeans` instead of `strainmeans` when MPD has fit a model.** LS-means adjust for covariates (cohort, age, batch) baked into MPD's project-level statistical models. For comparative ranking across strains within a project, lsmeans is the more honest summary when available (`\u002Fpheno\u002Flsmeans\u002F{projsym}` returns the list of `ls_measures`).\n\n5. **Validate strain names with `\u002Fstraininfo` before assuming a match.** MPD uses strict JAX canonical nomenclature; nearby synonyms (`B6`, `C57Bl\u002F6`, `C57BL\u002F6`) won't always resolve. `\u002Fstraininfo?name=...` returns both JAX and MPD records and tells you the canonical form.\n\n6. **Be polite — add `time.sleep(0.3)` in loops.** MPD doesn't publish a hard rate limit, but the server runs on shared academic infrastructure. Keep bursts under ~5 req\u002Fs.\n\n## Common Recipes\n\n### Recipe: Find Projects Testing a Trait by Free-Text Search\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef find_projects(keyword):\n    \"\"\"Search project titles for a keyword (case-insensitive).\"\"\"\n    projects = requests.get(f\"{MPD}\u002Fprojects\", timeout=30).json()[\"projects\"]\n    kw = keyword.lower()\n    hits = [p for p in projects if kw in (p.get(\"title\") or \"\").lower()]\n    return pd.DataFrame([{\n        \"projsym\": p[\"projsym\"],\n        \"panel\": p.get(\"panelsym\"),\n        \"nstrains\": p.get(\"nstrains\"),\n        \"year\": p.get(\"projyear\"),\n        \"title\": (p.get(\"title\") or \"\")[:80],\n    } for p in hits])\n\nprint(find_projects(\"glucose\").head(10).to_string(index=False))\n```\n\n### Recipe: Pull a Whole Project as a DataFrame in One Call\n\n```python\nimport requests, io, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef load_project_dataset(projsym):\n    \"\"\"Fetch \u002Fprojects\u002F{projsym}\u002Fdataset CSV directly into a DataFrame.\"\"\"\n    r = requests.get(f\"{MPD}\u002Fprojects\u002F{projsym}\u002Fdataset\", timeout=120)\n    r.raise_for_status()\n    return pd.read_csv(io.StringIO(r.text))\n\ndf = load_project_dataset(\"Jaxwest1\")\nprint(f\"Jaxwest1: {df.shape[0]} animals × {df.shape[1]} columns\")\nprint(\"Numeric columns:\", df.select_dtypes(\"number\").columns.tolist()[:8])\n```\n\n### Recipe: Cross-Strain Comparison from Strain Means\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Multiple measnums in one call (comma-separated selector)\nselector = \"15101,15102,15103\"   # HR, QRS, PR from Jaxwest1\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{selector}\", timeout=30).json()[\"strainmeans\"])\nwide = (sm[sm[\"sex\"] == \"m\"]\n        .pivot_table(index=\"strain\", columns=\"varname\", values=\"mean\", aggfunc=\"mean\")\n        .round(1))\nprint(wide.head(8).to_string())\n```\n\n### Recipe: Resolve Gene → Coordinates → Adjacent Region\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef gene_window(symbol, flank_kb=100):\n    r = requests.get(f\"{MPD}\u002Fgeneinfo\u002F{symbol}\", timeout=30).json()\n    if not r.get(\"gene info\"):\n        return None\n    g = r[\"gene info\"][0]\n    return {\n        \"symbol\": symbol,\n        \"chrom\": g[\"chrom\"],\n        \"start\": max(0, g[\"startbp\"] - flank_kb * 1000),\n        \"stop\": g[\"endbp\"] + flank_kb * 1000,\n        \"mgi\": g[\"mginum\"],\n        \"descrip\": g[\"descrip\"],\n    }\n\nprint(gene_window(\"Lep\", flank_kb=50))\n# {'symbol': 'Lep', 'chrom': '6', 'start': 29010220, 'stop': 29123877, 'mgi': 'MGI:104663', ...}\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `HTTP 404` with HTML body on `\u002Fstrain\u002F...`, `\u002Fprocedure`, `\u002Fpheno\u002Fquery`, `\u002Fmeasurement\u002F...`, `\u002Fproject\u002F...` | These paths don't exist — MPD's real API uses plural resource names and a different layout | Use `\u002Fprojects` (plural), `\u002Fprojects\u002F{projsym}\u002Fdataset`, `\u002Fpheno\u002Fstrainmeans\u002F{selector}`, `\u002Fpheno\u002Fmeasureinfo\u002F{selector}`, `\u002Fstraininfo` |\n| `HTTP 400` with `{\"error\": \"...selector arg must either be measure IDs or a project symbol\"}` | The path's selector arg got something else (a strain name, a varname, a category) | Resolve the right projsym or measnum first via `\u002Fprojects` or `\u002Fpheno\u002Fmeasureinfo\u002F{projsym}` |\n| `HTTP 404` with `{\"error\": \"No strainmeans data found for {selector}\"}` | The selector is the right kind but has no data (e.g., a measnum from a different project, or a typo) | Confirm the measnum exists via `\u002Fpheno\u002Fmeasureinfo\u002F{measnum}`; check it belongs to the project you think |\n| `KeyError: 'gene info'` when parsing `\u002Fgeneinfo\u002F{sym}` | Response key has a literal space: `\"gene info\"`, not `gene_info` | Access via `r.json()[\"gene info\"]` exactly |\n| `dataset` endpoint returns plain text instead of JSON | Default content type is CSV | Pass `params={\"json\": \"yes\"}` to force JSON; or parse the CSV with `pd.read_csv(io.StringIO(r.text))` |\n| Strain name returns empty `mpdinfo` from `\u002Fstraininfo` | Non-canonical name (e.g., `B6`, `C57Bl\u002F6`) | Use exact JAX nomenclature (`C57BL\u002F6J`); try `stocknum=` lookup if you have the JAX stock number |\n| `\u002Fpheno\u002Fmeasures_by_ontology\u002F{term}` returns `count: 0` but the term exists | No direct mappings; the term is too specific | Re-query with the term's parent (the response includes `ontology_terms[].parent`); or drop `this_term_only=yes` |\n| `HTTP 5xx` intermittently on large CSV pulls | MPD's per-project datasets can be tens of MB | Increase `timeout=120`; for very large projects use `csv=yes` + stream with `requests.get(..., stream=True)` |\n\n## Related Skills\n\n- `monarch-database` — disease-gene-phenotype knowledge graph with HPO ↔ MP cross-mappings; complement MPD's mouse-only data with human disease links\n- `ensembl-database` — mouse genome annotation (GRCm39 coordinates, transcripts, VEP) — pairs with MPD `\u002Fgeneinfo` for fine-grained gene-model details\n- `gwas-database` — human GWAS Catalog SNP-trait associations; conceptual analogue of MPD's QTL projects for human populations\n- `clinvar-database` — clinical variant interpretation; relevant when mapping a mouse QTL to a human disease gene\n\n## References\n\n- [Mouse Phenome Database portal](https:\u002F\u002Fphenome.jax.org\u002F) — interactive dataset browser and download UI\n- [MPD REST API documentation](https:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fapi) — authoritative endpoint reference (the one used to build this skill)\n- [Bogue et al., *Mammalian Genome* 2020](https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs00335-020-09839-9) — MPD overview paper (architecture, data content, strain coverage)\n- [Jackson Laboratory Inbred Strain Catalog](https:\u002F\u002Fwww.jax.org\u002Finbred-strains) — canonical strain nomenclature and stock numbers\n- [Mammalian Phenotype Ontology](https:\u002F\u002Fwww.informatics.jax.org\u002Fvocab\u002Fmp_ontology) — MP term browser (used by `\u002Fpheno\u002Fmeasures_by_ontology\u002F{term}`)\n- [MPD Data Use Policy](https:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fdatause) — CC-BY-4.0 license terms and citation requirements\n","# mouse-phenome-database\n\n## Overview\n\nThe Mouse Phenome Database (MPD), maintained at the Jackson Laboratory, catalogs standardized phenotype measurements across inbred, recombinant inbred (e.g., BXD), and Collaborative Cross \u002F Diversity Outbred mouse panels. It aggregates 520+ projects spanning metabolic, cardiovascular, behavioral, hematological, and immunological traits. The REST API at `https:\u002F\u002Fphenome.jax.org\u002Fapi` is free, requires no authentication, and is documented at \u003Chttps:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fapi>. MPD measurement IDs (`measnum`) are project-scoped 5-digit integers — there is no global \"measnum 10001 = body weight\" mapping; valid measnums must be discovered per project via the `measureinfo` endpoint.\n\n## When to Use\n\n- Selecting inbred strains with extreme phenotypes (highest\u002Flowest fasted glucose, body weight, heart rate, etc.) as experimental models\n- Pulling individual-animal data from BXD \u002F CC \u002F DO panels for QTL mapping with R\u002Fqtl2 or similar tools\n- Comparing strain means and variance across metabolic, behavioral, or cardiovascular measures for genetic background studies\n- Finding MPD projects that measure a trait of interest using ontology terms (MP, VT, MA) or free-text descriptions\n- Validating mouse strain nomenclature (canonical JAX names ↔ stock numbers ↔ MGI IDs) before submitting orders or analyses\n- Looking up coordinates and annotations for mouse genes in the MPD\u002FMGI cross-reference\n- Use **omics-plotting** SKILL to render strain-mean bar charts and strain × measure heatmaps from the query results\n- Use `monarch-database` instead for disease-gene-phenotype knowledge graphs (HPO ↔ MP ↔ disease)\n- Use `ensembl-database` instead for transcript-level mouse gene annotations and variant consequence prediction\n\n## Prerequisites\n\n- **Python packages**: `requests`, `pandas`, `matplotlib`\n- **Data requirements**: a project symbol (e.g., `Jaxwest1`, `Auwerx1`) or a measnum (e.g., `15101`); strain names follow JAX canonical nomenclature (e.g., `C57BL\u002F6J`, `DBA\u002F2J`)\n- **Environment**: internet connection; no API key required\n- **Rate limits**: no published hard limit; keep bursts under ~5 requests\u002Fsecond and add `time.sleep(0.3)` between requests in loops\n\n```bash\npip install requests pandas matplotlib\n```\n\n## Quick Start\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# 1) Pick a project (Jaxwest1 — cardiovascular phenotyping on inbred panel)\nr = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fstrains\", timeout=30)\nstrains = r.json()[\"strains\"]\nprint(f\"Jaxwest1: {len(strains)} strains tested\")\n\n# 2) Discover its measures\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002FJaxwest1\", timeout=30)\nmeasures = r.json()[\"measures_info\"]\nprint(f\"Jaxwest1 measures: {len(measures)}; first: measnum={measures[0]['measnum']} \"\n      f\"varname={measures[0]['varname']}  ({measures[0]['descrip']}, {measures[0]['units']})\")\n\n# 3) Pull strain means for heart rate (varname=HR, measnum=15101)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F15101\", timeout=30)\nsm = r.json()[\"strainmeans\"]\nprint(f\"\\nHeart rate strain means: {len(sm)} rows  (one per strain × sex)\")\ntop = sorted(sm, key=lambda x: x[\"mean\"], reverse=True)[:5]\nfor s in top:\n    print(f\"  {s['strain']:\u003C20}  sex={s['sex']}  mean={s['mean']:.0f} {s.get('varname','')}  n={s['nmice']}\")\n```\n\n## Core API\n\n### Module 1: Browse Projects — `\u002Fprojects`\n\nLists all MPD projects with full metadata. Filter via `investigator`, `projsym`, `projid`, `mpdsector`, `largecollab`, `panelsym`. Use `\u002Fproject_filters\u002F{filtername}` to see the allowed values of `mpdsector`, `largecollab`, or `panelsym` before filtering.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# List allowed panel symbols (e.g., BXD, CC, DO)\nfilters = requests.get(f\"{MPD}\u002Fproject_filters\u002Fpanelsym\", timeout=30).json()\nprint(f\"Available panels ({filters['count']}):\", [t['term'] for t in filters['terms']][:10])\n\n# All projects in the BXD recombinant inbred panel\nr = requests.get(f\"{MPD}\u002Fprojects\", params={\"panelsym\": \"BXD\"}, timeout=30)\nprojects = r.json()[\"projects\"]\nprint(f\"BXD projects: {len(projects)}\")\ndf = pd.DataFrame([{\n    \"projsym\": p[\"projsym\"],\n    \"pi\": p.get(\"pistring\", \"\")[:40],\n    \"nstrains\": p.get(\"nstrains\"),\n    \"ages\": p.get(\"ages\"),\n    \"sector\": p.get(\"mpdsector\"),\n    \"title\": (p.get(\"title\") or \"\")[:60],\n} for p in projects])\nprint(df.head(10).to_string(index=False))\n```\n\n```python\n# Filter by MPD sector — komp, pheno, qtla, snp, onestrain, phenoarchive\nr = requests.get(f\"{MPD}\u002Fprojects\", params={\"mpdsector\": \"qtla\"}, timeout=30)\nqtl_projects = r.json()[\"projects\"]\nprint(f\"QTL-archive projects: {len(qtl_projects)}\")\nfor p in qtl_projects[:5]:\n    print(f\"  {p['projsym']:\u003C15} panel={p.get('panelsym') or '--':\u003C6} nstrains={str(p.get('nstrains') or '--'):>4}  {(p.get('title') or '')[:55]}\")\n```\n\n### Module 2: Project Detail — `\u002Fprojects\u002F{projsym}\u002F...`\n\nEach project has sub-resources for its dataset (CSV of every animal × every measure), the strain panel it tested, the publications it produced, and (for QTL projects) the genetic markers used.\n\n```python\nimport requests, io, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Full per-animal dataset as CSV (default). Use json=yes for JSON.\nr = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fdataset\", timeout=60)\ndf = pd.read_csv(io.StringIO(r.text))\nprint(f\"Jaxwest1 dataset: {df.shape[0]} animals × {df.shape[1]} columns\")\nprint(df.columns[:12].tolist())\nprint(df[[\"strain\", \"sex\", \"animal_id\", \"HR\", \"QRS\", \"bw\"]].head(5).to_string(index=False))\n```\n\n```python\n# Strains tested in a project + publication list\nstrains = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fstrains\", timeout=30).json()\nprint(f\"Jaxwest1 strains ({strains['count']}):\")\nfor s in strains[\"strains\"][:5]:\n    print(f\"  {s['strainname']:\u003C20}  stock={s['stocknum']}  vendor={s['vendor']}\")\n\npubs = requests.get(f\"{MPD}\u002Fprojects\u002FJaxwest1\u002Fpublications\", timeout=30).json()\nprint(f\"\\nPublications: {pubs['count']}\")\n```\n\n### Module 3: Measure Discovery — `\u002Fpheno\u002Fmeasureinfo\u002F{selector}`\n\nThis is the canonical way to discover valid `measnum` values. The selector is either a project symbol (returns all measures in that project) or a measnum (returns metadata for one measure).\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# All measures in the Jaxwest1 cardiovascular project\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002FJaxwest1\", timeout=30)\nmeasures = r.json()[\"measures_info\"]\ndf = pd.DataFrame([{\n    \"measnum\": m[\"measnum\"],\n    \"varname\": m[\"varname\"],\n    \"descrip\": m[\"descrip\"],\n    \"units\": m.get(\"units\"),\n    \"sex\": m.get(\"sextested\"),\n    \"age\": m.get(\"ageweeks\"),\n} for m in measures])\nprint(f\"Jaxwest1 has {len(df)} measures\")\nprint(df.head(10).to_string(index=False))\n```\n\n```python\n# Single-measure metadata lookup (protocol + dimensional details)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F15101\", timeout=30).json()\nm = r[\"measures_info\"][0]\nprint(f\"measnum {m['measnum']} ({m['varname']}): {m['descrip']}\")\nprint(f\"  units: {m.get('units')}\")\nprint(f\"  project: {m.get('projsym')}  panel: {m.get('panelsym') or m.get('paneldesc')}\")\nprint(f\"  sex tested: {m.get('sextested')}  age: {m.get('ageweeks')}\")\nprint(f\"  method:  {(m.get('method') or '')[:120]}\")\n```\n\n### Module 4: Strain Means — `\u002Fpheno\u002Fstrainmeans\u002F{selector}`\n\nReturns strain × sex summary statistics. The selector takes a project symbol (all strain means for the project) or one-or-more comma-separated measnums. Each row contains `measnum, varname, strain, strainid, sex, mean, sd, sem, cv, minval, maxval, nmice, zscore`.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Strain means for one measure (heart rate, measnum=15101 from Jaxwest1)\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F15101\", timeout=30)\nsm = pd.DataFrame(r.json()[\"strainmeans\"])\nprint(f\"Rows: {len(sm)}  ({sm['strain'].nunique()} strains × {sm['sex'].nunique()} sexes)\")\n\n# Rank strains by male HR\nmale = sm[sm[\"sex\"] == \"m\"].sort_values(\"mean\", ascending=False)\nprint(male[[\"strain\", \"mean\", \"sd\", \"sem\", \"nmice\", \"zscore\"]].head(8).to_string(index=False))\n```\n\n```python\n# Optional: model-adjusted means (lsmeans) account for covariates fit in MPD's models.\n# Use lsmeans when comparing strains across cohorts within a project.\nr = requests.get(f\"{MPD}\u002Fpheno\u002Flsmeans\u002FJaxwest1\", timeout=30).json()\nprint(\"LS-mean measures available for Jaxwest1:\", r.get(\"ls_measures\", [])[:10])\n```\n\n### Module 5: Per-Animal Values — `\u002Fpheno\u002Fanimalvals\u002F{measnum}`\n\nRaw per-animal observations for one measure. Each row carries `animal_id, animal_projid, measnum, projsym, sex, stocknum, strain, strainid, value, varname, zscore`. Use this for QTL mapping, mixed-effects modeling, or distribution analysis.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Per-animal heart rate values\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fanimalvals\u002F15101\", timeout=30)\nad = pd.DataFrame(r.json()[\"animaldata\"])\nprint(f\"Animals measured: {len(ad)}\")\nprint(ad[[\"animal_id\", \"strain\", \"sex\", \"value\", \"zscore\"]].head(8).to_string(index=False))\n\n# Compare male-only strain distributions\nmale = ad[ad[\"sex\"] == \"m\"]\nstats = male.groupby(\"strain\")[\"value\"].agg([\"mean\", \"std\", \"count\"]).round(2)\nprint(f\"\\nMale HR by strain (top 5 by mean):\")\nprint(stats.sort_values(\"mean\", ascending=False).head(5))\n```\n\n### Module 6: Ontology-Based Measure Discovery — `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}`\n\nFind every MPD measure annotated to a Mammalian Phenotype (MP), Vertebrate Trait (VT), or Mouse Anatomy (MA) ontology term. Optional `this_term_only=yes` disables descendant-term expansion; `omit_baseline=yes` filters out baseline measures; `collapse_series=yes` collapses repeated time-points.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# MP:0001262 = \"decreased body weight\"\nr = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasures_by_ontology\u002FMP:0001262\",\n                 params={\"omit_baseline\": \"yes\", \"collapse_series\": \"yes\"},\n                 timeout=30).json()\nprint(f\"Measures mapped to MP:0001262 ('{r['ontology_terms'][0]['descrip']}'): {r['count']}\")\nif r[\"count\"]:\n    df = pd.DataFrame(r[\"measures\"])\n    print(df[[\"measnum\", \"varname\", \"descrip\", \"projsym\"]].head(8).to_string(index=False))\nelse:\n    print(\"(no direct measures; consider a broader parent term)\")\n```\n\n### Module 7: Strain Nomenclature — `\u002Fstraininfo`\n\nValidate and normalise strain names. Accepts `name`, `stocknum`, or `mginum` query params. Returns both `jaxinfo[]` (JAX availability\u002Fnomenclature) and `mpdinfo[]` (MPD's own metadata, including how many projects test this strain).\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Validate C57BL\u002F6J — note `requests` URL-encodes the slash automatically in params\nr = requests.get(f\"{MPD}\u002Fstraininfo\", params={\"name\": \"C57BL\u002F6J\"}, timeout=30).json()\njax = r[\"jaxinfo\"][0]\nmpd = r[\"mpdinfo\"][0]\nprint(f\"JAX:  {jax['nomenclature']}  stock={jax['stocknum']}  status={jax['avl_status']}\")\nprint(f\"MPD:  longname={mpd['longname']}  type={mpd['straintype']}  \"\n      f\"projects={mpd['nproj']}  snp_projects={mpd['nsnpproj']}  MGI={mpd['mginum']}\")\n```\n\n### Module 8: Gene Info — `\u002Fgeneinfo\u002F{symbol}`\n\nMouse-gene coordinates (GRCm39, in bp), strand, MGI ID, and a short description. Note the response key is the literal string `\"gene info\"` (with a space).\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\nr = requests.get(f\"{MPD}\u002Fgeneinfo\u002FLep\", timeout=30).json()\nfor g in r[\"gene info\"]:\n    print(f\"{g['descrip']}  chr{g['chrom']}:{g['startbp']:,}–{g['endbp']:,} ({g['strand']})\")\n    print(f\"  type: {g['featuretype']}  MGI: {g['mginum']}  cM: {g['centimorgan']}\")\n```\n\n## Key Concepts\n\n### Measnums Are Project-Scoped, Not Global\n\nEvery `measnum` belongs to exactly one project. `15101` is \"heart rate\" only within Jaxwest1; the same physiological trait in another project has a different measnum (e.g., `35702` for body weight in Lightfoot1). Never hardcode measnums for a trait — always resolve them by:\n\n1. Finding the project: `GET \u002Fprojects?panelsym=...` or `GET \u002Fprojects?investigator=...`\n2. Listing its measures: `GET \u002Fpheno\u002Fmeasureinfo\u002F{projsym}`\n3. Picking the right `varname` \u002F `descrip` \u002F `units` triple from the response\n\nOr go the other way and discover measures by ontology term first (Module 6).\n\n### Selectors: Projsym vs Measnum\n\nMost `\u002Fpheno\u002F*` endpoints take a \"selector\" path parameter that's overloaded:\n\n| Endpoint | Accepts as selector |\n|----------|---------------------|\n| `\u002Fpheno\u002Fstrainmeans\u002F{selector}` | projsym (e.g., `Jaxwest1`) **or** one or more comma-separated measnums |\n| `\u002Fpheno\u002Flsmeans\u002F{selector}` | same |\n| `\u002Fpheno\u002Fmeasureinfo\u002F{selector}` | same |\n| `\u002Fpheno\u002Fanimalvals\u002F{measnum}` | measnum only (use measureinfo to discover) |\n| `\u002Fpheno\u002Fanimalvals\u002Fseries\u002F{measnum}` | for timecourse\u002Fdose-response series |\n\nIf you pass an unrecognised selector you get a 400 JSON response (`{\"error\": \"...selector arg must either be measure IDs or a project symbol\"}`), not an HTML 404 — those are diagnostic and worth surfacing.\n\n### Strain Means vs LS-Means\n\n- `strainmeans` are unadjusted: simple per-strain × per-sex arithmetic means of the raw animal values.\n- `lsmeans` are model-adjusted least-squares means from MPD's pre-fit ANOVA-style models (accounting for cohort, batch, or covariate effects when present).\n\nFor cross-project comparisons or analyses sensitive to batch effects, prefer `lsmeans` when available. For simple ranking and exploratory work, `strainmeans` is fine.\n\n### MPD Sectors (`mpdsector` filter)\n\n| Sector | Content |\n|--------|---------|\n| `pheno` | Standard inbred-strain phenotyping projects |\n| `qtla` | QTL Archive — historical mapping studies with markers |\n| `komp` | Knockout Mouse Project (KOMP \u002F JaxLIMS) data |\n| `snp` | SNP genotype panels (use `\u002Fsnpdata`) |\n| `phenoarchive` | Archived legacy phenotype projects |\n| `onestrain` | Single-strain deep phenotyping |\n\nDiscover the live list any time with `GET \u002Fproject_filters\u002Fmpdsector`.\n\n## Common Workflows\n\n### Workflow 1: Pick a Trait → Find a Project → Plot Strain Means\n\n**Goal**: From \"I want to compare heart rate across inbred strains\" → land on real data and produce a ranked barplot.\n\n```python\nimport requests, pandas as pd, time\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# 1) Find candidate projects whose name\u002Fdescription hints at the trait\nprojects = requests.get(f\"{MPD}\u002Fprojects\", timeout=30).json()[\"projects\"]\ncandidates = [p for p in projects\n              if any(kw in (p.get(\"title\") or \"\").lower()\n                     for kw in [\"cardiovascular\", \"heart\", \"ekg\", \"ecg\"])]\nprint(f\"Candidate cardiovascular projects: {len(candidates)}\")\nfor p in candidates[:5]:\n    print(f\"  {p['projsym']:\u003C15}  nstrains={str(p.get('nstrains') or '--'):>3}  {(p.get('title') or '')[:60]}\")\n\n# 2) Inspect measures for the chosen project\nprojsym = \"Jaxwest1\"\nmi = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F{projsym}\", timeout=30).json()[\"measures_info\"]\nhr = next(m for m in mi if m[\"varname\"] == \"HR\")\nprint(f\"\\nPicked: {projsym} measnum={hr['measnum']} varname={hr['varname']} ({hr['descrip']}, {hr['units']})\")\n\n# 3) Pull strain means, plot male strains ranked\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{hr['measnum']}\", timeout=30).json()[\"strainmeans\"])\nmale = sm[sm[\"sex\"] == \"m\"].sort_values(\"mean\", ascending=False).reset_index(drop=True)\nmale.to_csv(\"mpd_strain_means.csv\", index=False)\nprint(f\"Strain means (male): {len(male)} strains -> mpd_strain_means.csv\")\n# Render with the omics-plotting SKILL (`skills\u002Fdata-visualization\u002Fomics-plotting\u002FSKILL.md`) \"Box \u002F Violin \u002F Bar\" recipe (bar of mean by strain,\n# yerr=sem) -> figures\u002Fmpd_strain_means.png\n```\n\n### Workflow 2: Per-Animal Data → R\u002Fqtl2 CSV Export\n\n**Goal**: Pull individual animal observations for a measure and shape them into a phenotype file ready for QTL mapping.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\nmeasnum = 15101  # heart rate in Jaxwest1\nmi = requests.get(f\"{MPD}\u002Fpheno\u002Fmeasureinfo\u002F{measnum}\", timeout=30).json()[\"measures_info\"][0]\nad = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fanimalvals\u002F{measnum}\", timeout=30).json()[\"animaldata\"])\nprint(f\"measnum {measnum}: {mi['varname']} ({mi['descrip']}, {mi['units']}) — {len(ad)} animals\")\n\n# R\u002Fqtl2-ready phenotype CSV: rows = individuals, cols = id + covariates + phenotype\nout = ad[[\"animal_id\", \"strain\", \"sex\", \"value\"]].rename(\n    columns={\"animal_id\": \"id\", \"value\": mi[\"varname\"]}\n)\nout.to_csv(f\"{measnum}_{mi['varname']}_qtl_pheno.csv\", index=False)\nprint(f\"Wrote {measnum}_{mi['varname']}_qtl_pheno.csv  ({len(out)} animals)\")\nprint(out.head().to_string(index=False))\n```\n\n### Workflow 3: Multi-Measure Heatmap Across a Strain Panel\n\n**Goal**: Build a wide-format strain × measure table (z-scored) from one project for comparative visualisation.\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\nprojsym = \"Jaxwest1\"\n\n# Pull all strain means for the project in one call\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{projsym}\", timeout=30).json()[\"strainmeans\"])\n\n# Use the precomputed z-scores; pivot to strain × varname (male only for simplicity)\nmale = sm[sm[\"sex\"] == \"m\"]\nwide = male.pivot_table(index=\"strain\", columns=\"varname\", values=\"zscore\", aggfunc=\"mean\")\nprint(f\"Shape: {wide.shape}  (strains × measures)\")\n\n# Subset to a handful of measures with full coverage\nkeep = wide.dropna(axis=1, thresh=int(0.8 * len(wide))).columns[:10]\nwide = wide[keep].dropna()\nprint(f\"After coverage filter: {wide.shape}\")\nwide.to_csv(\"mpd_strain_measure_matrix.csv\")\n# Render with the omics-plotting SKILL (`skills\u002Fdata-visualization\u002Fomics-plotting\u002FSKILL.md`) \"Expression heatmap\" recipe (strain x measure z-score,\n# RdBu_r, center=0) -> figures\u002Fmpd_strain_measure_heatmap.png\n```\n\n## Key Parameters\n\n| Parameter | Endpoint | Default | Range \u002F Options | Effect |\n|-----------|----------|---------|-----------------|--------|\n| `panelsym` | `\u002Fprojects` | — | strain panel symbol (`BXD`, `CC`, `DO`, …) | Filter projects to one mouse panel |\n| `mpdsector` | `\u002Fprojects` | — | `pheno`, `qtla`, `komp`, `snp`, `phenoarchive`, `onestrain` | Filter projects by data sector |\n| `investigator` | `\u002Fprojects`, `\u002Finvestigators` | — | investigator name substring | Filter projects by PI |\n| `csv` | `\u002Fprojects`, `\u002Finvestigators`, `\u002Fprojects\u002F{projsym}\u002Fdataset`, etc. | `no` | `yes` | Return CSV instead of JSON |\n| `json` | `\u002Fprojects\u002F{projsym}\u002Fdataset` | — | `yes` | Return JSON instead of default CSV |\n| `this_term_only` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Disable descendant-term expansion |\n| `omit_baseline` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Drop baseline measures from results |\n| `collapse_series` | `\u002Fpheno\u002Fmeasures_by_ontology\u002F{ont_term}` | `no` | `yes` | Collapse timecourse\u002Fdose series into single entries |\n| `region`, `dataset`, `strains` | `\u002Fsnpdata` | required | genomic region, dataset name, strain CSV | Pull SNP genotypes for region across strains |\n| `name` \u002F `stocknum` \u002F `mginum` | `\u002Fstraininfo` | one required | strain name, JAX stock #, or MGI ID | Validate \u002F look up strain |\n\n## Best Practices\n\n1. **Always discover measnums via `\u002Fpheno\u002Fmeasureinfo\u002F{projsym}` before querying data.** Measnums are project-scoped 5-digit integers; there is no global trait → measnum table. Hardcoding measnums you got from elsewhere will silently 404 or return \"no data\".\n\n2. **Use plural resource paths.** MPD uses `\u002Fprojects`, `\u002Fprojects\u002F{projsym}\u002Fstrains`, `\u002Fprojects\u002F{projsym}\u002Fdataset` — not singular. Old MPD documentation and several third-party wrappers list singular paths that return HTML 404s.\n\n3. **Prefer the project-level dataset CSV for bulk analysis.** When you want every animal × every measure for a project, `GET \u002Fprojects\u002F{projsym}\u002Fdataset` returns a single CSV in one request — much faster than looping `animalvals` per measnum.\n\n4. **Use `lsmeans` instead of `strainmeans` when MPD has fit a model.** LS-means adjust for covariates (cohort, age, batch) baked into MPD's project-level statistical models. For comparative ranking across strains within a project, lsmeans is the more honest summary when available (`\u002Fpheno\u002Flsmeans\u002F{projsym}` returns the list of `ls_measures`).\n\n5. **Validate strain names with `\u002Fstraininfo` before assuming a match.** MPD uses strict JAX canonical nomenclature; nearby synonyms (`B6`, `C57Bl\u002F6`, `C57BL\u002F6`) won't always resolve. `\u002Fstraininfo?name=...` returns both JAX and MPD records and tells you the canonical form.\n\n6. **Be polite — add `time.sleep(0.3)` in loops.** MPD doesn't publish a hard rate limit, but the server runs on shared academic infrastructure. Keep bursts under ~5 req\u002Fs.\n\n## Common Recipes\n\n### Recipe: Find Projects Testing a Trait by Free-Text Search\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef find_projects(keyword):\n    \"\"\"Search project titles for a keyword (case-insensitive).\"\"\"\n    projects = requests.get(f\"{MPD}\u002Fprojects\", timeout=30).json()[\"projects\"]\n    kw = keyword.lower()\n    hits = [p for p in projects if kw in (p.get(\"title\") or \"\").lower()]\n    return pd.DataFrame([{\n        \"projsym\": p[\"projsym\"],\n        \"panel\": p.get(\"panelsym\"),\n        \"nstrains\": p.get(\"nstrains\"),\n        \"year\": p.get(\"projyear\"),\n        \"title\": (p.get(\"title\") or \"\")[:80],\n    } for p in hits])\n\nprint(find_projects(\"glucose\").head(10).to_string(index=False))\n```\n\n### Recipe: Pull a Whole Project as a DataFrame in One Call\n\n```python\nimport requests, io, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef load_project_dataset(projsym):\n    \"\"\"Fetch \u002Fprojects\u002F{projsym}\u002Fdataset CSV directly into a DataFrame.\"\"\"\n    r = requests.get(f\"{MPD}\u002Fprojects\u002F{projsym}\u002Fdataset\", timeout=120)\n    r.raise_for_status()\n    return pd.read_csv(io.StringIO(r.text))\n\ndf = load_project_dataset(\"Jaxwest1\")\nprint(f\"Jaxwest1: {df.shape[0]} animals × {df.shape[1]} columns\")\nprint(\"Numeric columns:\", df.select_dtypes(\"number\").columns.tolist()[:8])\n```\n\n### Recipe: Cross-Strain Comparison from Strain Means\n\n```python\nimport requests, pandas as pd\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\n# Multiple measnums in one call (comma-separated selector)\nselector = \"15101,15102,15103\"   # HR, QRS, PR from Jaxwest1\nsm = pd.DataFrame(requests.get(f\"{MPD}\u002Fpheno\u002Fstrainmeans\u002F{selector}\", timeout=30).json()[\"strainmeans\"])\nwide = (sm[sm[\"sex\"] == \"m\"]\n        .pivot_table(index=\"strain\", columns=\"varname\", values=\"mean\", aggfunc=\"mean\")\n        .round(1))\nprint(wide.head(8).to_string())\n```\n\n### Recipe: Resolve Gene → Coordinates → Adjacent Region\n\n```python\nimport requests\n\nMPD = \"https:\u002F\u002Fphenome.jax.org\u002Fapi\"\n\ndef gene_window(symbol, flank_kb=100):\n    r = requests.get(f\"{MPD}\u002Fgeneinfo\u002F{symbol}\", timeout=30).json()\n    if not r.get(\"gene info\"):\n        return None\n    g = r[\"gene info\"][0]\n    return {\n        \"symbol\": symbol,\n        \"chrom\": g[\"chrom\"],\n        \"start\": max(0, g[\"startbp\"] - flank_kb * 1000),\n        \"stop\": g[\"endbp\"] + flank_kb * 1000,\n        \"mgi\": g[\"mginum\"],\n        \"descrip\": g[\"descrip\"],\n    }\n\nprint(gene_window(\"Lep\", flank_kb=50))\n# {'symbol': 'Lep', 'chrom': '6', 'start': 29010220, 'stop': 29123877, 'mgi': 'MGI:104663', ...}\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `HTTP 404` with HTML body on `\u002Fstrain\u002F...`, `\u002Fprocedure`, `\u002Fpheno\u002Fquery`, `\u002Fmeasurement\u002F...`, `\u002Fproject\u002F...` | These paths don't exist — MPD's real API uses plural resource names and a different layout | Use `\u002Fprojects` (plural), `\u002Fprojects\u002F{projsym}\u002Fdataset`, `\u002Fpheno\u002Fstrainmeans\u002F{selector}`, `\u002Fpheno\u002Fmeasureinfo\u002F{selector}`, `\u002Fstraininfo` |\n| `HTTP 400` with `{\"error\": \"...selector arg must either be measure IDs or a project symbol\"}` | The path's selector arg got something else (a strain name, a varname, a category) | Resolve the right projsym or measnum first via `\u002Fprojects` or `\u002Fpheno\u002Fmeasureinfo\u002F{projsym}` |\n| `HTTP 404` with `{\"error\": \"No strainmeans data found for {selector}\"}` | The selector is the right kind but has no data (e.g., a measnum from a different project, or a typo) | Confirm the measnum exists via `\u002Fpheno\u002Fmeasureinfo\u002F{measnum}`; check it belongs to the project you think |\n| `KeyError: 'gene info'` when parsing `\u002Fgeneinfo\u002F{sym}` | Response key has a literal space: `\"gene info\"`, not `gene_info` | Access via `r.json()[\"gene info\"]` exactly |\n| `dataset` endpoint returns plain text instead of JSON | Default content type is CSV | Pass `params={\"json\": \"yes\"}` to force JSON; or parse the CSV with `pd.read_csv(io.StringIO(r.text))` |\n| Strain name returns empty `mpdinfo` from `\u002Fstraininfo` | Non-canonical name (e.g., `B6`, `C57Bl\u002F6`) | Use exact JAX nomenclature (`C57BL\u002F6J`); try `stocknum=` lookup if you have the JAX stock number |\n| `\u002Fpheno\u002Fmeasures_by_ontology\u002F{term}` returns `count: 0` but the term exists | No direct mappings; the term is too specific | Re-query with the term's parent (the response includes `ontology_terms[].parent`); or drop `this_term_only=yes` |\n| `HTTP 5xx` intermittently on large CSV pulls | MPD's per-project datasets can be tens of MB | Increase `timeout=120`; for very large projects use `csv=yes` + stream with `requests.get(..., stream=True)` |\n\n## Related Skills\n\n- `monarch-database` — disease-gene-phenotype knowledge graph with HPO ↔ MP cross-mappings; complement MPD's mouse-only data with human disease links\n- `ensembl-database` — mouse genome annotation (GRCm39 coordinates, transcripts, VEP) — pairs with MPD `\u002Fgeneinfo` for fine-grained gene-model details\n- `gwas-database` — human GWAS Catalog SNP-trait associations; conceptual analogue of MPD's QTL projects for human populations\n- `clinvar-database` — clinical variant interpretation; relevant when mapping a mouse QTL to a human disease gene\n\n## References\n\n- [Mouse Phenome Database portal](https:\u002F\u002Fphenome.jax.org\u002F) — interactive dataset browser and download UI\n- [MPD REST API documentation](https:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fapi) — authoritative endpoint reference (the one used to build this skill)\n- [Bogue et al., *Mammalian Genome* 2020](https:\u002F\u002Fdoi.org\u002F10.1007\u002Fs00335-020-09839-9) — MPD overview paper (architecture, data content, strain coverage)\n- [Jackson Laboratory Inbred Strain Catalog](https:\u002F\u002Fwww.jax.org\u002Finbred-strains) — canonical strain nomenclature and stock numbers\n- [Mammalian Phenotype Ontology](https:\u002F\u002Fwww.informatics.jax.org\u002Fvocab\u002Fmp_ontology) — MP term browser (used by `\u002Fpheno\u002Fmeasures_by_ontology\u002F{term}`)\n- [MPD Data Use Policy](https:\u002F\u002Fphenome.jax.org\u002Fabout\u002Fdatause) — CC-BY-4.0 license terms and citation requirements\n",{"name":5,"license":15,"description":7},"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fawesome-skills\u002Fmouse-phenome-database",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill mouse-phenome-database",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill mouse-phenome-database",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill mouse-phenome-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fmouse-phenome-database\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]