Bulk Rna Seq Deconvolution With Bulk2single logo

Bulk Rna Seq Deconvolution With Bulk2single

Organization
omicverse
bulk-rna-seq-deconvolution-with-bulk2single

Turn bulk RNA-seq cohorts into synthetic single-cell datasets using omicverse's Bulk2Single workflow for cell fraction estimation, beta-VAE generation, and quality control comparisons against reference scRNA-seq.

Overview

Publisheromicverse
Repositoryomicclaw
Skill namebulk-rna-seq-deconvolution-with-bulk2single
Stars
33
Forks
5
Bundled files
1
LicenseGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by omicverse on GitHub. Read the source before you install it.

Installation

Install the Bulk Rna Seq Deconvolution With Bulk2single AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/omicverse/omicclaw/tree/main/src/omicverse_skills/skills/bulk-to-single-deconvolution
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/omicverse/omicclaw.git /tmp/omicclaw
mkdir -p .claude/skills
cp -r /tmp/omicclaw/src/omicverse_skills/skills/bulk-to-single-deconvolution .claude/skills/bulk-rna-seq-deconvolution-with-bulk2single
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bulk Rna Seq Deconvolution With Bulk2single in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bulk Rna Seq Deconvolution With Bulk2single on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bulk Rna Seq Deconvolution With Bulk2single is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Bulk RNA-seq deconvolution with Bulk2Single

Overview

Use this skill when a user wants to reconstruct single-cell profiles from bulk RNA-seq together with a matched reference scRNA-seq atlas. It follows t_bulk2single.ipynb, which demonstrates how to harmonise PDAC bulk replicates, train the beta-VAE generator, and benchmark the output cells against dentate gyrus scRNA-seq.

Instructions

  1. Load libraries and data
    • Import omicverse as ov, scanpy as sc, scvelo as scv, anndata, and matplotlib.pyplot as plt, then call ov.plot_set() to match omicverse styling.
    • Read the bulk counts table with ov.read(...)/ov.utils.read(...) and harmonise gene identifiers via ov.bulk.Matrix_ID_mapping(<df>, 'genesets/pair_GRCm39.tsv').
    • Load the reference scRNA-seq AnnData (e.g., scv.datasets.dentategyrus()) and confirm the cluster labels (stored in adata.obs['clusters']).
  2. Initialise the Bulk2Single model
    • Instantiate ov.bulk2single.Bulk2Single(bulk_data=bulk_df, single_data=adata, celltype_key='clusters', bulk_group=['dg_d_1', 'dg_d_2', 'dg_d_3'], top_marker_num=200, ratio_num=1, gpu=0).
    • Explain GPU selection (gpu=-1 forces CPU) and how bulk_group names align with column IDs in the bulk matrix.
  3. Estimate cell fractions
    • Call model.predicted_fraction() to run the integrated TAPE estimator, then plot stacked bar charts per sample to validate proportions.
    • Encourage saving the fraction table for downstream reporting (df.to_csv(...)).
  4. Preprocess for beta-VAE
    • Execute model.bulk_preprocess_lazy(), model.single_preprocess_lazy(), and model.prepare_input() to produce matched feature spaces.
    • Clarify that the lazy preprocessing expects raw counts; skip if the user has already log-normalised data and instead provide aligned matrices manually.
  5. Train or load the beta-VAE
    • Train with model.train(batch_size=512, learning_rate=1e-4, hidden_size=256, epoch_num=3500, vae_save_dir='...', vae_save_name='dg_vae', generate_save_dir='...', generate_save_name='dg').
    • Mention early stopping via patience and how to resume by reloading weights with model.load('.../dg_vae.pth').
    • Use model.plot_loss() to monitor convergence.
  6. Generate and filter synthetic cells
    • Produce an AnnData using model.generate() and reduce noise through model.filtered(generate_adata, leiden_size=25).
    • Store the filtered AnnData (.write_h5ad) for reuse, noting it contains PCA embeddings in obsm['X_pca'].
  7. Benchmark against the reference atlas
    • Plot cell-type compositions with ov.bulk2single.bulk2single_plot_cellprop(...) for both generated and reference data.
    • Assess correlation using ov.bulk2single.bulk2single_plot_correlation(single_data, generate_adata, celltype_key='clusters').
    • Embed with generate_adata.obsm['X_mde'] = ov.pl.mde(generate_adata.obsm['X_pca']) and visualise via ov.pl.embedding(..., color=['clusters'], palette=ov.pl.sc_color()).
  8. Defensive validation
    python
    # Before Bulk2Single: verify gene name overlap between bulk and reference
    shared_genes = set(bulk_df.index) & set(adata.var_names)
    assert len(shared_genes) > 100, f"Only {len(shared_genes)} shared genes — check gene ID format (Ensembl vs symbol)"
    # Verify bulk_group column names match
    for g in bulk_group:
        assert g in bulk_df.columns, f"Bulk group '{g}' not found in bulk data columns"
    # Verify cell type key exists
    assert celltype_key in adata.obs.columns, f"Cell type column '{celltype_key}' not found in reference AnnData"
  9. Troubleshooting tips
    • If marker selection fails, increase top_marker_num or provide a curated marker list.
    • Alignment errors typically stem from mismatched bulk_group names—double-check column IDs in the bulk matrix.
    • Training on CPU can take several hours; advise switching gpu to an available CUDA device for speed.

Examples

  • "Estimate cell fractions for PDAC bulk replicates and generate synthetic scRNA-seq using Bulk2Single."
  • "Load a pre-trained Bulk2Single model, regenerate cells, and compare cluster proportions to the dentate gyrus atlas."
  • "Plot correlation heatmaps between generated cells and reference clusters after filtering noisy synthetic cells."

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bulk Rna Seq Deconvolution With Bulk2single AI skill do?

Turn bulk RNA-seq cohorts into synthetic single-cell datasets using omicverse's Bulk2Single workflow for cell fraction estimation, beta-VAE generation, and quality control comparisons against reference scRNA-seq.

Why use Bulk Rna Seq Deconvolution With Bulk2single on TypingMind?

Because you install it once and use it with any model. Bulk Rna Seq Deconvolution With Bulk2single is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bulk Rna Seq Deconvolution With Bulk2single in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/omicverse/omicclaw/tree/main/src/omicverse_skills/skills/bulk-to-single-deconvolution. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bulk Rna Seq Deconvolution With Bulk2single?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bulk Rna Seq Deconvolution With Bulk2single?

As many as you like. As long as a model supports skills, you can use Bulk Rna Seq Deconvolution With Bulk2single with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bulk Rna Seq Deconvolution With Bulk2single AI skill free?

Yes. It is published on GitHub by omicverse under the GPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇