omicverse/omicverse-skills/cross-modal-celltype-transfer
Claude Code and agent skill by omicverse/omicverse-skills
- community
Checking that the SKILL.md file is still in the repository.
Transfer cell-type labels from a reference AnnData to a query AnnData with OmicVerse weighted KNN over a shared embedding. Use when converting OmicVerse cross-modal annotation notebooks into a reusable skill, when labeling an ATAC query from an RNA reference, or when you need the weighted_knn_trainer / weighted_knn_transfer workflow plus optional visualization.
Install
npx vskill@latest install omicverse/omicverse-skills/cross-modal-celltype-transferSKILL.md
OmicVerse Cross-Modal Cell Type Transfer
Goal
Transfer cell labels from a reference AnnData to a query AnnData using a shared latent space such as X_glue, then write predicted labels and uncertainty scores back to the query object. Keep this as one skill: the notebook's plots are optional presentation on top of the same transfer job, not a separate capability.
Quick Workflow
- Confirm the query and reference expose the same embedding basis in
.obsm, or fall back toX. - Confirm the reference has the target label column in
.obs. - Train
ov.utils.weighted_knn_trainer(...)on the reference embedding. - Transfer labels with
ov.utils.weighted_knn_transfer(...). - Store the first label column and uncertainty column in
query_adata.obs. - Plot on an existing basis for smoke validation; use
mdeonly ifpymdeis available.
Interface Summary
weighted_knn_trainer(train_adata, train_adata_emb, n_neighbors=50)builds the reference KNN model.weighted_knn_transfer(query_adata, query_adata_emb, ref_adata_obs, label_keys, knn_model, threshold=1, pred_unknown=False, mode='package')returns prediction and uncertainty DataFrames.embedding(adata, basis, ..., show=None, save=None, return_fig=None, ...)plots any existing basis.mde(data, device=None, **kwargs)is optional; it depends onpymdeand is only for visualization.
Branch Selection
- Use
mode='package'for transfer. The current source only implements this branch;mode='paper'is documented in the docstring but raises in the live code. - Leave
pred_unknown=Falsefor the default label-assignment path. - Set
pred_unknown=Trueonly when you want threshold-basedUnknownlabels. - Use
mdeonly as an optional visual branch. Ifpymdeis missing, skip it and plot onX_glueor another precomputed basis instead.
Input Contract
train_adataandquery_adatamust expose the same latent basis name in.obsm, or useX.ref_adata_obs[label_keys]must exist; the function selects columns whose names start withlabel_keys.- If you want one label column, make the prefix unique.
- The notebook's
transf_celltypeandtransf_celltype_uncare the reuse convention for storing outputs on the query object.
Minimal Execution Patterns
Core transfer:
Optional smoke plot:
Validation
labelsanduncertmust both be DataFrames indexed byquery_adata.obs_names.- The expected label column should appear in both outputs.
query_adata.obs["transf_celltype"]andquery_adata.obs["transf_celltype_unc"]should exist after writeback.- If you call
mde, verifypymdeis installed first; otherwise skip it. - For plots, confirm the basis you pass actually exists in
.obsm.
Resource Map
- Read
references/integration-method-selection.mdfor skill boundary and branch selection. - Read
references/source-notebook-map.mdto map notebook cells to the reusable workflow. - Read
references/source-grounding.mdfor inspected signatures and source behavior. - Read
references/compatibility.mdfor known runtime caveats.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/omicverse_skills/skills/cross-modal-celltype-transfer/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/omicverse/omicverse-skills/cross-modal-celltype-transfer)