[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76E47FYHDVSAKK2BYHB55MH":3,"skill-same:01M76E47FYHDVSAKK2BYHB55MH":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},"01M76E47FYHDVSAKK2BYHB55MH","multimodal-omics-integration",null,"Multimodal and multi-section integration for spatial and single-cell omics: totalVI joint RNA + protein (Visium CytAssist Gene and Protein, CITE-seq), MultiVI joint RNA + ATAC (10x Multiome, spatial ATAC-RNA), BBKNN integration of several tissue sections, scanpy ingest label transfer between sections, and gene signature scores mapped on tissue. Outputs joint latent spaces, denoised protein maps, integrated clusters, transferred labels. For dissociated CITE-seq and scVI\u002FscANVI use scvi-tools-single-cell; for MOFA+ factor analysis use mofaplus-multi-omics or muon-multiomics-singlecell; for Harmony use harmony-batch-correction.","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\u002Fmultimodal-omics-integration\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"multimodal-omics-integration\"\ndescription: \"Multimodal and multi-section integration for spatial and single-cell omics: totalVI joint RNA + protein (Visium CytAssist Gene and Protein, CITE-seq), MultiVI joint RNA + ATAC (10x Multiome, spatial ATAC-RNA), BBKNN integration of several tissue sections, scanpy ingest label transfer between sections, and gene signature scores mapped on tissue. Outputs joint latent spaces, denoised protein maps, integrated clusters, transferred labels. For dissociated CITE-seq and scVI\u002FscANVI use scvi-tools-single-cell; for MOFA+ factor analysis use mofaplus-multi-omics or muon-multiomics-singlecell; for Harmony use harmony-batch-correction.\"\nlicense: \"CC-BY-4.0\"\n---\n\n# Multimodal Omics Integration\n\n## Overview\n\nCombine modalities measured on the same spots or cells, or several sections of\nthe same tissue, into one representation. Output: joint latent spaces and\nclusters, denoised protein maps, integrated sections, transferred labels and\nsignature scores on the tissue.\n\n| Question | Method | Module |\n|---|---|---|\n| RNA + protein on the same spots \u002F cells | totalVI | 1-2 |\n| RNA + chromatin accessibility on the same cells | MultiVI | 3 |\n| Several sections or samples, one modality | BBKNN | 4 |\n| Labels from an annotated section onto a new one | scanpy ingest | 5 |\n| Pathway or cell state activity on tissue | `sc.tl.score_genes` | 6 |\n| Unsupervised factors across 2+ omics | MOFA+ | `mofaplus-multi-omics` |\n\n## When to Use\n\n- Analysing Visium CytAssist Gene and Protein (or CITE-seq) data with RNA and protein in one model\n- Integrating RNA and ATAC measured on the same cells (10x Multiome, spatial ATAC-RNA)\n- Clustering several tissue sections together without merging their coordinates\n- Copying labels from an annotated section to a new section of the same platform\n- Mapping pathway or cell state signatures onto the tissue\n- Use `scvi-tools-single-cell` instead for dissociated scVI\u002FscANVI workflows without a spatial angle\n- For factor analysis across omics layers, use `mofaplus-multi-omics` or `muon-multiomics-singlecell` instead\n\n## Prerequisites\n\n- **Input**: raw counts for every modality (totalVI and MultiVI model counts)\n- **Compute**: scvi-tools pulls torch; GPU recommended for MultiVI, totalVI runs on CPU\n  for a few thousand spots\n- **Python packages**: `scvi-tools`, `mudata` (Module 3), `bbknn` (Module 4), `scanpy`\n\n```bash\n# Install only what `import` reports missing. `--pypi` keeps the env's scanpy\u002Fnumba\n# stack; a conda add can swap it and bare pip can shadow it.\npixi add --pypi scvi-tools mudata bbknn scanpy\n```\n\n## Quick Start\n\nIntegrate two sections and cluster them jointly:\n\n```python\nimport bbknn\nimport scanpy as sc\n\nadata = sc.concat({\"s1\": sc.read_h5ad(\"section1.h5ad\"), \"s2\": sc.read_h5ad(\"section2.h5ad\")},\n                  label=\"section\", index_unique=\"-\")\nsc.pp.normalize_total(adata); sc.pp.log1p(adata); sc.pp.pca(adata, n_comps=30)\nbbknn.bbknn(adata, batch_key=\"section\", n_pcs=30)\nsc.tl.leiden(adata, key_added=\"joint_cluster\", flavor=\"igraph\", n_iterations=2)\n```\n\n## Core API\n\n### Module 1: Load Spatial RNA + Protein (Visium CytAssist)\n\nDemo: 10x human tonsil, FFPE, CytAssist Gene and Protein (~35 antibodies).\nFor your own data set `OUTS` to the Space Ranger `outs\u002F` folder.\n\n```python\nimport tarfile\nimport urllib.request\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport scanpy as sc\n\nCACHE = Path(\"data_cache\u002FCytAssist_FFPE_Protein_Expression_Human_Tonsil\")\nBASE = (\"https:\u002F\u002Fcf.10xgenomics.com\u002Fsamples\u002Fspatial-exp\u002F2.1.0\u002FCytAssist_FFPE_Protein_Expression_Human_Tonsil\u002F\"\n        \"CytAssist_FFPE_Protein_Expression_Human_Tonsil_\")\nCACHE.mkdir(parents=True, exist_ok=True)\nfor name in [\"filtered_feature_bc_matrix.h5\", \"spatial.tar.gz\"]:\n    if not (CACHE \u002F name).exists():\n        urllib.request.urlretrieve(BASE + name, CACHE \u002F name)          # ~37 MB + ~34 MB\nif not (CACHE \u002F \"spatial\").exists():\n    with tarfile.open(CACHE \u002F \"spatial.tar.gz\") as tar:\n        tar.extractall(CACHE, filter=\"data\")\nOUTS = CACHE\n\nraw = sc.read_10x_h5(OUTS \u002F \"filtered_feature_bc_matrix.h5\", gex_only=False)\nraw.var_names_make_unique()\nprint(raw.var[\"feature_types\"].value_counts())   # Gene Expression + Antibody Capture\npos = pd.read_csv(OUTS \u002F \"spatial\u002Ftissue_positions.csv\", index_col=0)\nraw.obsm[\"spatial\"] = pos.loc[raw.obs_names, [\"pxl_col_in_fullres\", \"pxl_row_in_fullres\"]].to_numpy(float)\n\nrna = raw[:, raw.var[\"feature_types\"] == \"Gene Expression\"].copy()\nprot = raw[:, raw.var[\"feature_types\"] == \"Antibody Capture\"]\nrna.obsm[\"protein_expression\"] = pd.DataFrame(prot.X.toarray(), index=prot.obs_names,\n                                              columns=prot.var_names)\nsc.pp.filter_cells(rna, min_counts=200)\nprint(rna, f\"\\nproteins: {rna.obsm['protein_expression'].shape[1]}\")\n```\n\n### Module 2: Joint RNA + Protein with totalVI\n\ntotalVI separates protein foreground from background binding and learns one\nlatent space from both modalities.\n\n```python\nimport scvi\n\nrna.layers[\"counts\"] = rna.X.copy()\ntmp = rna.copy()                                 # HVGs on log data; model on counts\nsc.pp.normalize_total(tmp)\nsc.pp.log1p(tmp)\nsc.pp.highly_variable_genes(tmp, n_top_genes=4000)\nrna = rna[:, tmp.var[\"highly_variable\"]].copy()\n\nscvi.model.TOTALVI.setup_anndata(rna, layer=\"counts\", protein_expression_obsm_key=\"protein_expression\",\n                                 batch_key=None)  # set to the section\u002Fsample column for several slides\nmodel = scvi.model.TOTALVI(rna, n_latent=20)\nmodel.train(max_epochs=400, early_stopping=True)\n\nrna.obsm[\"X_totalVI\"] = model.get_latent_representation()\nrna_norm, prot_norm = model.get_normalized_expression(n_samples=25, return_mean=True)\nrna.obsm[\"protein_denoised\"] = prot_norm         # DataFrame, spots x proteins\nsc.pp.neighbors(rna, use_rep=\"X_totalVI\")\nsc.tl.umap(rna)\nsc.tl.leiden(rna, resolution=0.6, key_added=\"totalvi_leiden\", flavor=\"igraph\", n_iterations=2)\n\nshow = list(prot_norm.columns[:4])\nfor p in show:\n    rna.obs[f\"prot_{p}\"] = np.log1p(prot_norm[p].to_numpy())\nsc.pl.embedding(rna, basis=\"spatial\", color=[\"totalvi_leiden\"] + [f\"prot_{p}\" for p in show],\n                size=1.5, show=False, save=\"_totalvi.png\")\nmodel.save(\"totalvi_model\", overwrite=True)\nrna.write_h5ad(\"totalvi_result.h5ad\", compression=\"gzip\")\n```\n\nCompare raw and denoised protein maps for known markers (CD3, CD20 \u002F MS4A1,\nCD21 in tonsil follicles) before trusting clusters. Isotype-control antibodies\nshould come out near zero after denoising.\n\n### Module 3: Joint RNA + ATAC with MultiVI\n\nInput is a MuData with an RNA and an ATAC modality of the same cells (10x\nMultiome; spatial ATAC-RNA-seq has the same layout plus coordinates). Demo: 10x\nPBMC 10k Multiome subset from the scvi-tools tutorial.\n\n```python\nimport mudata as md\nimport scipy.sparse as sp\n\npath = Path(\"data_cache\u002Fpbmc_10k_preprocessed.h5mu\")\nif not path.exists():\n    path.parent.mkdir(parents=True, exist_ok=True)\n    urllib.request.urlretrieve(\"https:\u002F\u002Fexampledata.scverse.org\u002Fscvi-tools\u002Fpbmc_10k_preprocessed.h5mu\", path)\nmdata = md.read_h5mu(path)\nRNA, ATAC = \"rna_subset\", \"atac_subset\"          # modality names in your MuData\nfor m in (RNA, ATAC):\n    mdata.mod[m].X = sp.csr_matrix(mdata.mod[m].X)\nmdata.update()\n\nscvi.model.MULTIVI.setup_mudata(mdata, modalities={\"rna_layer\": RNA, \"atac_layer\": ATAC})\nmvi = scvi.model.MULTIVI(mdata, n_genes=mdata.mod[RNA].n_vars, n_regions=mdata.mod[ATAC].n_vars)\nmvi.train()                                      # GPU strongly recommended (~100k peaks)\n\njoint = mdata.mod[RNA].copy()\njoint.obsm[\"X_multivi\"] = mvi.get_latent_representation()\nsc.pp.neighbors(joint, use_rep=\"X_multivi\")\nsc.tl.umap(joint)\nsc.tl.leiden(joint, key_added=\"multivi_leiden\", flavor=\"igraph\", n_iterations=2)\naccess = mvi.get_normalized_accessibility()      # imputed accessibility, cells x peaks\njoint.write_h5ad(\"multivi_result.h5ad\", compression=\"gzip\")\nprint(joint.obs[\"multivi_leiden\"].value_counts())\n```\n\nFor a batch, add `batch_key=\"\u003Cobs column>\"` to `setup_mudata` and\n`\"batch_key\": RNA` to `modalities`. On spatial ATAC-RNA data copy the\ncoordinates into `joint.obsm[\"spatial\"]` and plot `multivi_leiden` on them.\n\n### Module 4: Integrate Several Sections (BBKNN)\n\nBBKNN builds the neighbour graph from k neighbours **per section**, so sections\nmix in the graph without changing expression values. Spatial coordinates stay\nper section.\n\n```python\nimport bbknn\n\nPATHS = {\"s1\": \"section1.h5ad\", \"s2\": \"section2.h5ad\"}   # raw counts + obsm[\"spatial\"] each\ncombined = sc.concat({k: sc.read_h5ad(v) for k, v in PATHS.items()}, label=\"section\", index_unique=\"-\")\ncombined.layers[\"counts\"] = combined.X.copy()\nsc.pp.normalize_total(combined)\nsc.pp.log1p(combined)\nsc.pp.highly_variable_genes(combined, n_top_genes=2000, batch_key=\"section\")  # panels: skip\nsc.pp.pca(combined, n_comps=30)\nbbknn.bbknn(combined, batch_key=\"section\", n_pcs=30, neighbors_within_batch=3)\nsc.tl.umap(combined)\nsc.tl.leiden(combined, resolution=0.5, key_added=\"bbknn_leiden\", flavor=\"igraph\", n_iterations=2)\n\nmix = pd.crosstab(combined.obs[\"bbknn_leiden\"], combined.obs[\"section\"], normalize=\"index\").round(2)\nprint(mix)                                       # a cluster from one section only: biology or residual batch\nfor s in PATHS:\n    part = combined[combined.obs[\"section\"] == s]\n    sc.pl.embedding(part, basis=\"spatial\", color=\"bbknn_leiden\", size=1.5, show=False, save=f\"_bbknn_{s}.png\")\ncombined.write_h5ad(\"bbknn_result.h5ad\", compression=\"gzip\")\n```\n\n### Module 5: Transfer Labels Between Sections (ingest)\n\n`sc.tl.ingest` projects a query onto the reference PCA\u002FUMAP and copies labels\nfrom nearest neighbours. It does no batch correction, so use it between\nsections of the **same platform and panel**. For an scRNA-seq reference onto\nimaging data use the Harmony route in\n`spatial-transcriptomics-cell-type-annotation`; for Visium spots use\ndeconvolution.\n\n```python\nref = sc.read_h5ad(\"celltype_annotated.h5ad\")    # annotated section, log-normalised X\nquery = sc.read_h5ad(\"new_section.h5ad\")         # log-normalised X\nLABELS = [\"cell_type\"]\n\ncommon = ref.var_names.intersection(query.var_names)\nprint(f\"shared genes: {len(common)}\")\nref, query = ref[:, common].copy(), query[:, common].copy()\nsc.pp.pca(ref, n_comps=30)                       # PCA on the shared genes only\nsc.pp.neighbors(ref, n_neighbors=15)\nsc.tl.umap(ref)\nsc.tl.ingest(query, ref, obs=LABELS, embedding_method=\"umap\")\nquery.obs[LABELS].to_csv(\"ingest_annotations.csv\")\nprint(query.obs[\"cell_type\"].value_counts())\nquery.write_h5ad(\"ingest_result.h5ad\", compression=\"gzip\")\n```\n\n### Module 6: Score Gene Signatures on the Tissue\n\n```python\nadata = sc.read_h5ad(\"path\u002Fto\u002Fspatial.h5ad\")    # all genes, obsm[\"spatial\"]\nX_IS_COUNTS = True                               # False if X is already log-normalised\nif X_IS_COUNTS:\n    sc.pp.normalize_total(adata)\n    sc.pp.log1p(adata)\nSIGNATURES = {\"T_cell\": [\"CD3D\", \"CD3E\", \"CD2\", \"CD8A\"], \"B_cell\": [\"MS4A1\", \"CD79A\", \"CD19\"]}\n\nlookup = {g.upper(): g for g in adata.var_names}             # case-insensitive match, names unchanged\nfor name, genes in SIGNATURES.items():\n    found = [lookup[g.upper()] for g in genes if g.upper() in lookup]\n    missing = [g for g in genes if g.upper() not in lookup]\n    print(f\"{name}: {len(found)}\u002F{len(genes)} genes found; missing {missing}\")\n    if found:\n        sc.tl.score_genes(adata, found, score_name=f\"{name}_score\", ctrl_size=50, n_bins=25)\ncols = [c for c in adata.obs if c.endswith(\"_score\")]\nadata.obs[cols].to_csv(\"signature_scores.csv\")\nsc.pl.embedding(adata, basis=\"spatial\", color=cols, cmap=\"viridis\", size=1.5, show=False, save=\"_scores.png\")\n```\n\nScores are relative to random control genes of similar expression; on a\ntargeted panel of a few hundred genes lower `ctrl_size` and read scores as\nrankings, not absolute activity.\n\n## Common Workflows\n\n### Workflow: Name totalVI Clusters from Denoised Proteins\n\nModules 1-2, then a protein evidence table per cluster - antibodies are often\nthe clearest markers on CytAssist data:\n\n```python\nprot = pd.DataFrame(np.log1p(prot_norm.to_numpy()), index=prot_norm.index, columns=prot_norm.columns)\nby_cluster = prot.groupby(rna.obs[\"totalvi_leiden\"].to_numpy()).mean()\nz = (by_cluster - by_cluster.mean()) \u002F by_cluster.std(ddof=0)\ntop = z.apply(lambda r: \", \".join(r.nlargest(4).index), axis=1)\nrna_log = rna.copy(); sc.pp.normalize_total(rna_log); sc.pp.log1p(rna_log)   # rna.X holds counts\nsc.tl.rank_genes_groups(rna_log, \"totalvi_leiden\", method=\"wilcoxon\")\ngenes = (sc.get.rank_genes_groups_df(rna_log, group=None).groupby(\"group\").head(5)\n         .groupby(\"group\")[\"names\"].apply(\", \".join))\nevidence = pd.DataFrame({\"n_spots\": rna.obs[\"totalvi_leiden\"].value_counts(), \"top_proteins\": top,\n                         \"top_genes\": genes})\nevidence.to_csv(\"totalvi_cluster_evidence.csv\")\nprint(evidence)\n```\n\nName each cluster from both columns; a cluster supported by RNA but not by\nprotein (or the reverse) deserves a note in the report.\n\n### Workflow: Compare Signatures Across Integrated Sections\n\nModules 4 and 6: integrate sections, score signatures, then compare each\njoint cluster's score between sections:\n\n```python\ncombined = sc.read_h5ad(\"bbknn_result.h5ad\")          # Module 4 output, log-normalised X\nlookup = {g.upper(): g for g in combined.var_names}\nfor name, genes in SIGNATURES.items():\n    found = [lookup[g.upper()] for g in genes if g.upper() in lookup]\n    if len(found) >= 3:\n        sc.tl.score_genes(combined, found, score_name=f\"{name}_score\")\ncols = [c for c in combined.obs if c.endswith(\"_score\")]\ntable = combined.obs.groupby([\"bbknn_leiden\", \"section\"], observed=True)[cols].mean().unstack(\"section\")\ntable.round(3).to_csv(\"signature_by_cluster_section.csv\")\nprint(table.round(2))\n```\n\n## Key Parameters\n\n| Parameter | Default | Effect |\n|---|---|---|\n| `n_latent` (totalVI) | 20 | Joint latent dimensions |\n| `n_top_genes` (totalVI) | 4000 | RNA genes modelled with the proteins |\n| `max_epochs` | 400 (totalVI); scvi default (MultiVI) | Training length; early stopping on validation loss |\n| `batch_key` | None | Section\u002Fsample column corrected inside the scvi model |\n| `neighbors_within_batch` | 3 | BBKNN neighbours taken from each section |\n| `ctrl_size` (`score_genes`) | 50 | Control genes per expression bin |\n\n## Common Recipes\n\n### Recipe: Does Protein Agree with RNA?\n\nFor markers measured both ways, low correlation flags a weak antibody or\npost-transcriptional regulation:\n\n```python\nPAIRS = {\"CD3\": \"CD3E\", \"CD20\": \"MS4A1\", \"CD4\": \"CD4\", \"CD8\": \"CD8A\"}   # protein name -> gene\nnorm = rna.copy(); sc.pp.normalize_total(norm); sc.pp.log1p(norm)\nrows = []\nfor protein, gene in PAIRS.items():\n    pcol = [c for c in prot_norm.columns if c.upper().startswith(protein.upper())]\n    if pcol and gene in norm.var_names:\n        g = np.asarray(norm[:, gene].X.todense()).ravel() if hasattr(norm.X, \"todense\") else norm[:, gene].X.ravel()\n        rows.append((protein, gene, np.corrcoef(np.log1p(prot_norm[pcol[0]]), g)[0, 1]))\nprint(pd.DataFrame(rows, columns=[\"protein\", \"gene\", \"r\"]).round(2))\n```\n\n### Recipe: totalVI Across Several Sections\n\nSet `batch_key` so the model removes section effects inside the latent space:\n\n```python\nsections = sc.concat({\"s1\": rna_s1, \"s2\": rna_s2}, label=\"section\", index_unique=\"-\")   # each prepared as in Module 1\nsections.obsm[\"protein_expression\"] = pd.concat([rna_s1.obsm[\"protein_expression\"],\n                                                 rna_s2.obsm[\"protein_expression\"]]).set_axis(sections.obs_names)\nsections.layers[\"counts\"] = sections.X.copy()\nscvi.model.TOTALVI.setup_anndata(sections, layer=\"counts\", protein_expression_obsm_key=\"protein_expression\",\n                                 batch_key=\"section\")\nmodel = scvi.model.TOTALVI(sections, n_latent=20)\nmodel.train(max_epochs=400, early_stopping=True)\nsections.obsm[\"X_totalVI\"] = model.get_latent_representation()\n```\n\nBoth sections need the same antibody panel; keep the shared proteins only if\nthey differ.\n\n## Expected Outputs\n\n- `totalvi_result.h5ad`, `totalvi_model\u002F` - joint latent space, denoised protein, clusters\n- `multivi_result.h5ad` - RNA+ATAC latent space and clusters\n- `bbknn_result.h5ad` - integrated sections with clusters\n- `ingest_annotations.csv`, `ingest_result.h5ad` - labels transferred to the new section\n- `signature_scores.csv` - per-spot\u002Fcell signature scores\n- `figures\u002F` - spatial maps of clusters, proteins and scores\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| totalVI `ValueError` on protein data | Proteins in `X`, not `obsm` | Split by `feature_types` into `obsm[\"protein_expression\"]` (Module 1) |\n| Denoised protein flat everywhere | Too few epochs or very low antibody counts | Check raw counts per antibody; train longer |\n| MultiVI `n_genes`\u002F`n_regions` error | Constructor sizes missing or modalities misnamed | Pass both sizes; check `mdata.mod` keys |\n| MultiVI training very slow | CPU with ~100k peaks | Use a GPU, or keep peaks found in > 1-5% of cells |\n| BBKNN clusters still split by section | Strong batch effect | Use scVI with `batch_key` (`scvi-tools-single-cell`) or Harmony |\n| ingest labels all one type | Different platform \u002F normalisation between sections | Normalise both the same way; use the Harmony route for cross-platform transfer |\n| `score_genes` warns about missing genes | Panel lacks them | Report coverage; do not score with \u003C 3 genes |\n\n## Related Skills\n\n- `scvi-tools-single-cell` - scVI\u002FscANVI and totalVI on dissociated cells\n- `muon-multiomics-singlecell` - MuData handling, WNN, MOFA through muon\n- `mofaplus-multi-omics` - MOFA+ factor analysis across omics layers\n- `harmony-batch-correction` - linear batch correction of PCA embeddings\n- `spatial-transcriptomics-cell-type-annotation` - reference-based labels for imaging data\n- `spatial-transcriptomics-deconvolution-cell2location` - cell type abundance on Visium spots\n- `spatial-domain-detection` - tissue domains from the integrated data\n\n## References\n\n- Gayoso et al. (2021) totalVI, Nature Methods: https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-020-01050-x\n- Ashuach et al. (2023) MultiVI, Nature Methods: https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-023-01909-9\n- Polanski et al. (2019) BBKNN, Bioinformatics: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fbioinformatics\u002Fbtz625\n- scvi-tools documentation: https:\u002F\u002Fdocs.scvi-tools.org\u002Fen\u002Fstable\u002F\n- scanpy ingest: https:\u002F\u002Fscanpy.readthedocs.io\u002Fen\u002Fstable\u002Fgenerated\u002Fscanpy.tl.ingest.html\n","# Multimodal Omics Integration\n\n## Overview\n\nCombine modalities measured on the same spots or cells, or several sections of\nthe same tissue, into one representation. Output: joint latent spaces and\nclusters, denoised protein maps, integrated sections, transferred labels and\nsignature scores on the tissue.\n\n| Question | Method | Module |\n|---|---|---|\n| RNA + protein on the same spots \u002F cells | totalVI | 1-2 |\n| RNA + chromatin accessibility on the same cells | MultiVI | 3 |\n| Several sections or samples, one modality | BBKNN | 4 |\n| Labels from an annotated section onto a new one | scanpy ingest | 5 |\n| Pathway or cell state activity on tissue | `sc.tl.score_genes` | 6 |\n| Unsupervised factors across 2+ omics | MOFA+ | `mofaplus-multi-omics` |\n\n## When to Use\n\n- Analysing Visium CytAssist Gene and Protein (or CITE-seq) data with RNA and protein in one model\n- Integrating RNA and ATAC measured on the same cells (10x Multiome, spatial ATAC-RNA)\n- Clustering several tissue sections together without merging their coordinates\n- Copying labels from an annotated section to a new section of the same platform\n- Mapping pathway or cell state signatures onto the tissue\n- Use `scvi-tools-single-cell` instead for dissociated scVI\u002FscANVI workflows without a spatial angle\n- For factor analysis across omics layers, use `mofaplus-multi-omics` or `muon-multiomics-singlecell` instead\n\n## Prerequisites\n\n- **Input**: raw counts for every modality (totalVI and MultiVI model counts)\n- **Compute**: scvi-tools pulls torch; GPU recommended for MultiVI, totalVI runs on CPU\n  for a few thousand spots\n- **Python packages**: `scvi-tools`, `mudata` (Module 3), `bbknn` (Module 4), `scanpy`\n\n```bash\n# Install only what `import` reports missing. `--pypi` keeps the env's scanpy\u002Fnumba\n# stack; a conda add can swap it and bare pip can shadow it.\npixi add --pypi scvi-tools mudata bbknn scanpy\n```\n\n## Quick Start\n\nIntegrate two sections and cluster them jointly:\n\n```python\nimport bbknn\nimport scanpy as sc\n\nadata = sc.concat({\"s1\": sc.read_h5ad(\"section1.h5ad\"), \"s2\": sc.read_h5ad(\"section2.h5ad\")},\n                  label=\"section\", index_unique=\"-\")\nsc.pp.normalize_total(adata); sc.pp.log1p(adata); sc.pp.pca(adata, n_comps=30)\nbbknn.bbknn(adata, batch_key=\"section\", n_pcs=30)\nsc.tl.leiden(adata, key_added=\"joint_cluster\", flavor=\"igraph\", n_iterations=2)\n```\n\n## Core API\n\n### Module 1: Load Spatial RNA + Protein (Visium CytAssist)\n\nDemo: 10x human tonsil, FFPE, CytAssist Gene and Protein (~35 antibodies).\nFor your own data set `OUTS` to the Space Ranger `outs\u002F` folder.\n\n```python\nimport tarfile\nimport urllib.request\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport scanpy as sc\n\nCACHE = Path(\"data_cache\u002FCytAssist_FFPE_Protein_Expression_Human_Tonsil\")\nBASE = (\"https:\u002F\u002Fcf.10xgenomics.com\u002Fsamples\u002Fspatial-exp\u002F2.1.0\u002FCytAssist_FFPE_Protein_Expression_Human_Tonsil\u002F\"\n        \"CytAssist_FFPE_Protein_Expression_Human_Tonsil_\")\nCACHE.mkdir(parents=True, exist_ok=True)\nfor name in [\"filtered_feature_bc_matrix.h5\", \"spatial.tar.gz\"]:\n    if not (CACHE \u002F name).exists():\n        urllib.request.urlretrieve(BASE + name, CACHE \u002F name)          # ~37 MB + ~34 MB\nif not (CACHE \u002F \"spatial\").exists():\n    with tarfile.open(CACHE \u002F \"spatial.tar.gz\") as tar:\n        tar.extractall(CACHE, filter=\"data\")\nOUTS = CACHE\n\nraw = sc.read_10x_h5(OUTS \u002F \"filtered_feature_bc_matrix.h5\", gex_only=False)\nraw.var_names_make_unique()\nprint(raw.var[\"feature_types\"].value_counts())   # Gene Expression + Antibody Capture\npos = pd.read_csv(OUTS \u002F \"spatial\u002Ftissue_positions.csv\", index_col=0)\nraw.obsm[\"spatial\"] = pos.loc[raw.obs_names, [\"pxl_col_in_fullres\", \"pxl_row_in_fullres\"]].to_numpy(float)\n\nrna = raw[:, raw.var[\"feature_types\"] == \"Gene Expression\"].copy()\nprot = raw[:, raw.var[\"feature_types\"] == \"Antibody Capture\"]\nrna.obsm[\"protein_expression\"] = pd.DataFrame(prot.X.toarray(), index=prot.obs_names,\n                                              columns=prot.var_names)\nsc.pp.filter_cells(rna, min_counts=200)\nprint(rna, f\"\\nproteins: {rna.obsm['protein_expression'].shape[1]}\")\n```\n\n### Module 2: Joint RNA + Protein with totalVI\n\ntotalVI separates protein foreground from background binding and learns one\nlatent space from both modalities.\n\n```python\nimport scvi\n\nrna.layers[\"counts\"] = rna.X.copy()\ntmp = rna.copy()                                 # HVGs on log data; model on counts\nsc.pp.normalize_total(tmp)\nsc.pp.log1p(tmp)\nsc.pp.highly_variable_genes(tmp, n_top_genes=4000)\nrna = rna[:, tmp.var[\"highly_variable\"]].copy()\n\nscvi.model.TOTALVI.setup_anndata(rna, layer=\"counts\", protein_expression_obsm_key=\"protein_expression\",\n                                 batch_key=None)  # set to the section\u002Fsample column for several slides\nmodel = scvi.model.TOTALVI(rna, n_latent=20)\nmodel.train(max_epochs=400, early_stopping=True)\n\nrna.obsm[\"X_totalVI\"] = model.get_latent_representation()\nrna_norm, prot_norm = model.get_normalized_expression(n_samples=25, return_mean=True)\nrna.obsm[\"protein_denoised\"] = prot_norm         # DataFrame, spots x proteins\nsc.pp.neighbors(rna, use_rep=\"X_totalVI\")\nsc.tl.umap(rna)\nsc.tl.leiden(rna, resolution=0.6, key_added=\"totalvi_leiden\", flavor=\"igraph\", n_iterations=2)\n\nshow = list(prot_norm.columns[:4])\nfor p in show:\n    rna.obs[f\"prot_{p}\"] = np.log1p(prot_norm[p].to_numpy())\nsc.pl.embedding(rna, basis=\"spatial\", color=[\"totalvi_leiden\"] + [f\"prot_{p}\" for p in show],\n                size=1.5, show=False, save=\"_totalvi.png\")\nmodel.save(\"totalvi_model\", overwrite=True)\nrna.write_h5ad(\"totalvi_result.h5ad\", compression=\"gzip\")\n```\n\nCompare raw and denoised protein maps for known markers (CD3, CD20 \u002F MS4A1,\nCD21 in tonsil follicles) before trusting clusters. Isotype-control antibodies\nshould come out near zero after denoising.\n\n### Module 3: Joint RNA + ATAC with MultiVI\n\nInput is a MuData with an RNA and an ATAC modality of the same cells (10x\nMultiome; spatial ATAC-RNA-seq has the same layout plus coordinates). Demo: 10x\nPBMC 10k Multiome subset from the scvi-tools tutorial.\n\n```python\nimport mudata as md\nimport scipy.sparse as sp\n\npath = Path(\"data_cache\u002Fpbmc_10k_preprocessed.h5mu\")\nif not path.exists():\n    path.parent.mkdir(parents=True, exist_ok=True)\n    urllib.request.urlretrieve(\"https:\u002F\u002Fexampledata.scverse.org\u002Fscvi-tools\u002Fpbmc_10k_preprocessed.h5mu\", path)\nmdata = md.read_h5mu(path)\nRNA, ATAC = \"rna_subset\", \"atac_subset\"          # modality names in your MuData\nfor m in (RNA, ATAC):\n    mdata.mod[m].X = sp.csr_matrix(mdata.mod[m].X)\nmdata.update()\n\nscvi.model.MULTIVI.setup_mudata(mdata, modalities={\"rna_layer\": RNA, \"atac_layer\": ATAC})\nmvi = scvi.model.MULTIVI(mdata, n_genes=mdata.mod[RNA].n_vars, n_regions=mdata.mod[ATAC].n_vars)\nmvi.train()                                      # GPU strongly recommended (~100k peaks)\n\njoint = mdata.mod[RNA].copy()\njoint.obsm[\"X_multivi\"] = mvi.get_latent_representation()\nsc.pp.neighbors(joint, use_rep=\"X_multivi\")\nsc.tl.umap(joint)\nsc.tl.leiden(joint, key_added=\"multivi_leiden\", flavor=\"igraph\", n_iterations=2)\naccess = mvi.get_normalized_accessibility()      # imputed accessibility, cells x peaks\njoint.write_h5ad(\"multivi_result.h5ad\", compression=\"gzip\")\nprint(joint.obs[\"multivi_leiden\"].value_counts())\n```\n\nFor a batch, add `batch_key=\"\u003Cobs column>\"` to `setup_mudata` and\n`\"batch_key\": RNA` to `modalities`. On spatial ATAC-RNA data copy the\ncoordinates into `joint.obsm[\"spatial\"]` and plot `multivi_leiden` on them.\n\n### Module 4: Integrate Several Sections (BBKNN)\n\nBBKNN builds the neighbour graph from k neighbours **per section**, so sections\nmix in the graph without changing expression values. Spatial coordinates stay\nper section.\n\n```python\nimport bbknn\n\nPATHS = {\"s1\": \"section1.h5ad\", \"s2\": \"section2.h5ad\"}   # raw counts + obsm[\"spatial\"] each\ncombined = sc.concat({k: sc.read_h5ad(v) for k, v in PATHS.items()}, label=\"section\", index_unique=\"-\")\ncombined.layers[\"counts\"] = combined.X.copy()\nsc.pp.normalize_total(combined)\nsc.pp.log1p(combined)\nsc.pp.highly_variable_genes(combined, n_top_genes=2000, batch_key=\"section\")  # panels: skip\nsc.pp.pca(combined, n_comps=30)\nbbknn.bbknn(combined, batch_key=\"section\", n_pcs=30, neighbors_within_batch=3)\nsc.tl.umap(combined)\nsc.tl.leiden(combined, resolution=0.5, key_added=\"bbknn_leiden\", flavor=\"igraph\", n_iterations=2)\n\nmix = pd.crosstab(combined.obs[\"bbknn_leiden\"], combined.obs[\"section\"], normalize=\"index\").round(2)\nprint(mix)                                       # a cluster from one section only: biology or residual batch\nfor s in PATHS:\n    part = combined[combined.obs[\"section\"] == s]\n    sc.pl.embedding(part, basis=\"spatial\", color=\"bbknn_leiden\", size=1.5, show=False, save=f\"_bbknn_{s}.png\")\ncombined.write_h5ad(\"bbknn_result.h5ad\", compression=\"gzip\")\n```\n\n### Module 5: Transfer Labels Between Sections (ingest)\n\n`sc.tl.ingest` projects a query onto the reference PCA\u002FUMAP and copies labels\nfrom nearest neighbours. It does no batch correction, so use it between\nsections of the **same platform and panel**. For an scRNA-seq reference onto\nimaging data use the Harmony route in\n`spatial-transcriptomics-cell-type-annotation`; for Visium spots use\ndeconvolution.\n\n```python\nref = sc.read_h5ad(\"celltype_annotated.h5ad\")    # annotated section, log-normalised X\nquery = sc.read_h5ad(\"new_section.h5ad\")         # log-normalised X\nLABELS = [\"cell_type\"]\n\ncommon = ref.var_names.intersection(query.var_names)\nprint(f\"shared genes: {len(common)}\")\nref, query = ref[:, common].copy(), query[:, common].copy()\nsc.pp.pca(ref, n_comps=30)                       # PCA on the shared genes only\nsc.pp.neighbors(ref, n_neighbors=15)\nsc.tl.umap(ref)\nsc.tl.ingest(query, ref, obs=LABELS, embedding_method=\"umap\")\nquery.obs[LABELS].to_csv(\"ingest_annotations.csv\")\nprint(query.obs[\"cell_type\"].value_counts())\nquery.write_h5ad(\"ingest_result.h5ad\", compression=\"gzip\")\n```\n\n### Module 6: Score Gene Signatures on the Tissue\n\n```python\nadata = sc.read_h5ad(\"path\u002Fto\u002Fspatial.h5ad\")    # all genes, obsm[\"spatial\"]\nX_IS_COUNTS = True                               # False if X is already log-normalised\nif X_IS_COUNTS:\n    sc.pp.normalize_total(adata)\n    sc.pp.log1p(adata)\nSIGNATURES = {\"T_cell\": [\"CD3D\", \"CD3E\", \"CD2\", \"CD8A\"], \"B_cell\": [\"MS4A1\", \"CD79A\", \"CD19\"]}\n\nlookup = {g.upper(): g for g in adata.var_names}             # case-insensitive match, names unchanged\nfor name, genes in SIGNATURES.items():\n    found = [lookup[g.upper()] for g in genes if g.upper() in lookup]\n    missing = [g for g in genes if g.upper() not in lookup]\n    print(f\"{name}: {len(found)}\u002F{len(genes)} genes found; missing {missing}\")\n    if found:\n        sc.tl.score_genes(adata, found, score_name=f\"{name}_score\", ctrl_size=50, n_bins=25)\ncols = [c for c in adata.obs if c.endswith(\"_score\")]\nadata.obs[cols].to_csv(\"signature_scores.csv\")\nsc.pl.embedding(adata, basis=\"spatial\", color=cols, cmap=\"viridis\", size=1.5, show=False, save=\"_scores.png\")\n```\n\nScores are relative to random control genes of similar expression; on a\ntargeted panel of a few hundred genes lower `ctrl_size` and read scores as\nrankings, not absolute activity.\n\n## Common Workflows\n\n### Workflow: Name totalVI Clusters from Denoised Proteins\n\nModules 1-2, then a protein evidence table per cluster - antibodies are often\nthe clearest markers on CytAssist data:\n\n```python\nprot = pd.DataFrame(np.log1p(prot_norm.to_numpy()), index=prot_norm.index, columns=prot_norm.columns)\nby_cluster = prot.groupby(rna.obs[\"totalvi_leiden\"].to_numpy()).mean()\nz = (by_cluster - by_cluster.mean()) \u002F by_cluster.std(ddof=0)\ntop = z.apply(lambda r: \", \".join(r.nlargest(4).index), axis=1)\nrna_log = rna.copy(); sc.pp.normalize_total(rna_log); sc.pp.log1p(rna_log)   # rna.X holds counts\nsc.tl.rank_genes_groups(rna_log, \"totalvi_leiden\", method=\"wilcoxon\")\ngenes = (sc.get.rank_genes_groups_df(rna_log, group=None).groupby(\"group\").head(5)\n         .groupby(\"group\")[\"names\"].apply(\", \".join))\nevidence = pd.DataFrame({\"n_spots\": rna.obs[\"totalvi_leiden\"].value_counts(), \"top_proteins\": top,\n                         \"top_genes\": genes})\nevidence.to_csv(\"totalvi_cluster_evidence.csv\")\nprint(evidence)\n```\n\nName each cluster from both columns; a cluster supported by RNA but not by\nprotein (or the reverse) deserves a note in the report.\n\n### Workflow: Compare Signatures Across Integrated Sections\n\nModules 4 and 6: integrate sections, score signatures, then compare each\njoint cluster's score between sections:\n\n```python\ncombined = sc.read_h5ad(\"bbknn_result.h5ad\")          # Module 4 output, log-normalised X\nlookup = {g.upper(): g for g in combined.var_names}\nfor name, genes in SIGNATURES.items():\n    found = [lookup[g.upper()] for g in genes if g.upper() in lookup]\n    if len(found) >= 3:\n        sc.tl.score_genes(combined, found, score_name=f\"{name}_score\")\ncols = [c for c in combined.obs if c.endswith(\"_score\")]\ntable = combined.obs.groupby([\"bbknn_leiden\", \"section\"], observed=True)[cols].mean().unstack(\"section\")\ntable.round(3).to_csv(\"signature_by_cluster_section.csv\")\nprint(table.round(2))\n```\n\n## Key Parameters\n\n| Parameter | Default | Effect |\n|---|---|---|\n| `n_latent` (totalVI) | 20 | Joint latent dimensions |\n| `n_top_genes` (totalVI) | 4000 | RNA genes modelled with the proteins |\n| `max_epochs` | 400 (totalVI); scvi default (MultiVI) | Training length; early stopping on validation loss |\n| `batch_key` | None | Section\u002Fsample column corrected inside the scvi model |\n| `neighbors_within_batch` | 3 | BBKNN neighbours taken from each section |\n| `ctrl_size` (`score_genes`) | 50 | Control genes per expression bin |\n\n## Common Recipes\n\n### Recipe: Does Protein Agree with RNA?\n\nFor markers measured both ways, low correlation flags a weak antibody or\npost-transcriptional regulation:\n\n```python\nPAIRS = {\"CD3\": \"CD3E\", \"CD20\": \"MS4A1\", \"CD4\": \"CD4\", \"CD8\": \"CD8A\"}   # protein name -> gene\nnorm = rna.copy(); sc.pp.normalize_total(norm); sc.pp.log1p(norm)\nrows = []\nfor protein, gene in PAIRS.items():\n    pcol = [c for c in prot_norm.columns if c.upper().startswith(protein.upper())]\n    if pcol and gene in norm.var_names:\n        g = np.asarray(norm[:, gene].X.todense()).ravel() if hasattr(norm.X, \"todense\") else norm[:, gene].X.ravel()\n        rows.append((protein, gene, np.corrcoef(np.log1p(prot_norm[pcol[0]]), g)[0, 1]))\nprint(pd.DataFrame(rows, columns=[\"protein\", \"gene\", \"r\"]).round(2))\n```\n\n### Recipe: totalVI Across Several Sections\n\nSet `batch_key` so the model removes section effects inside the latent space:\n\n```python\nsections = sc.concat({\"s1\": rna_s1, \"s2\": rna_s2}, label=\"section\", index_unique=\"-\")   # each prepared as in Module 1\nsections.obsm[\"protein_expression\"] = pd.concat([rna_s1.obsm[\"protein_expression\"],\n                                                 rna_s2.obsm[\"protein_expression\"]]).set_axis(sections.obs_names)\nsections.layers[\"counts\"] = sections.X.copy()\nscvi.model.TOTALVI.setup_anndata(sections, layer=\"counts\", protein_expression_obsm_key=\"protein_expression\",\n                                 batch_key=\"section\")\nmodel = scvi.model.TOTALVI(sections, n_latent=20)\nmodel.train(max_epochs=400, early_stopping=True)\nsections.obsm[\"X_totalVI\"] = model.get_latent_representation()\n```\n\nBoth sections need the same antibody panel; keep the shared proteins only if\nthey differ.\n\n## Expected Outputs\n\n- `totalvi_result.h5ad`, `totalvi_model\u002F` - joint latent space, denoised protein, clusters\n- `multivi_result.h5ad` - RNA+ATAC latent space and clusters\n- `bbknn_result.h5ad` - integrated sections with clusters\n- `ingest_annotations.csv`, `ingest_result.h5ad` - labels transferred to the new section\n- `signature_scores.csv` - per-spot\u002Fcell signature scores\n- `figures\u002F` - spatial maps of clusters, proteins and scores\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| totalVI `ValueError` on protein data | Proteins in `X`, not `obsm` | Split by `feature_types` into `obsm[\"protein_expression\"]` (Module 1) |\n| Denoised protein flat everywhere | Too few epochs or very low antibody counts | Check raw counts per antibody; train longer |\n| MultiVI `n_genes`\u002F`n_regions` error | Constructor sizes missing or modalities misnamed | Pass both sizes; check `mdata.mod` keys |\n| MultiVI training very slow | CPU with ~100k peaks | Use a GPU, or keep peaks found in > 1-5% of cells |\n| BBKNN clusters still split by section | Strong batch effect | Use scVI with `batch_key` (`scvi-tools-single-cell`) or Harmony |\n| ingest labels all one type | Different platform \u002F normalisation between sections | Normalise both the same way; use the Harmony route for cross-platform transfer |\n| `score_genes` warns about missing genes | Panel lacks them | Report coverage; do not score with \u003C 3 genes |\n\n## Related Skills\n\n- `scvi-tools-single-cell` - scVI\u002FscANVI and totalVI on dissociated cells\n- `muon-multiomics-singlecell` - MuData handling, WNN, MOFA through muon\n- `mofaplus-multi-omics` - MOFA+ factor analysis across omics layers\n- `harmony-batch-correction` - linear batch correction of PCA embeddings\n- `spatial-transcriptomics-cell-type-annotation` - reference-based labels for imaging data\n- `spatial-transcriptomics-deconvolution-cell2location` - cell type abundance on Visium spots\n- `spatial-domain-detection` - tissue domains from the integrated data\n\n## References\n\n- Gayoso et al. (2021) totalVI, Nature Methods: https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-020-01050-x\n- Ashuach et al. (2023) MultiVI, Nature Methods: https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-023-01909-9\n- Polanski et al. (2019) BBKNN, Bioinformatics: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fbioinformatics\u002Fbtz625\n- scvi-tools documentation: https:\u002F\u002Fdocs.scvi-tools.org\u002Fen\u002Fstable\u002F\n- scanpy ingest: https:\u002F\u002Fscanpy.readthedocs.io\u002Fen\u002Fstable\u002Fgenerated\u002Fscanpy.tl.ingest.html\n",{"name":5,"license":15,"description":7},"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fawesome-skills\u002Fmultimodal-omics-integration",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 multimodal-omics-integration",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill multimodal-omics-integration",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill multimodal-omics-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fmultimodal-omics-integration\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",[],[]]