bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when comparing bulk expression strata against clinical time-to-event data with Kaplan-Meier and log-rank tests. R survival also fits Cox HR; Python reports a descriptive events/person-time ratio. Skip missing clinical outcomes.
$ npx -y skills add tiangzlab/omicsclaw --skill bulkrna-survival --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bulkrna-survivalContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when comparing bulk expression strata against clinical time-to-event data with Kaplan-Meier and log-rank tests. R survival also fits Cox HR; Python reports a descriptive events/person-time ratio. Skip missing clinical outcomes.
name: bulkrna-survival description: Load when comparing bulk expression strata against clinical time-to-event data with Kaplan-Meier and log-rank tests. R survival also fits Cox HR; Python reports a descriptive events/person-time ratio. Skip missing clinical outcomes. trigger: survival, Kaplan-Meier, Cox, prognosis, hazard ratio, overall survival, clinical outcome tags: - bulkrna - survival - Kaplan-Meier - Cox - hazard-ratio - clinical
Load when comparing bulk expression strata against clinical time-to-event data with Kaplan-Meier and log-rank tests. R survival also fits Cox HR; Python reports a descriptive events/person-time ratio. Skip missing clinical outcomes.
from skills._sdk.notebook import load_skill, write_output
library = load_skill("bulkrna-survival")
result = library.analyze(data, clinical=clinical, backend="python")
write_output(result, "tables/result.csv")
write_output(library.curve_figure(result, gene="G"), "figures/result.png")Read expression and metadata with `read_input` before calling the library. `examples/example_step.py` constructs a small synthetic dataset and checks its results through the step runner and fresh-kernel replay.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return gene-wise survival comparisons without modifying expression.
:param data: Nonnegative feature-by-sample expression. :param clinical: Clinical table with unique sample, nonnegative time and binary event columns. :param genes: Genes to test; None uses every row. Missing genes raise. :param cutoff_method: CLI default median; optimal scans cuts with unadjusted p-values. :param backend: auto prefers R survival with Cox HR, as the CLI did; python uses an events/person-time ratio. :returns: Per-gene table with diagnostics and KM points attached in attrs. :raises ValueError: Identifiers, clinical values, requested genes or comparison groups are invalid. :raises ImportError: Explicit R backend lacks survival or Matrix. :raises RuntimeError: The requested R method fails or returns incomplete results.
Return actual backend, HR estimator and summary.
:param data: Result from analyze. :param keep: Keep diagnostics by default; the CLI passes False. :returns: Diagnostics dictionary. :raises ValueError: The table has no analysis diagnostics.
Return the fitted Kaplan-Meier points for both expression strata.
:param data: Result from analyze. :returns: New table with gene, group, time and survival columns. :raises ValueError: The result lacks stored curves.
Plot the stored Kaplan-Meier curves for one analyzed gene.
:param data: Result from analyze. :param gene: Exact gene identifier in the result. :returns: Matplotlib Figure. :raises ValueError: No curve exists for the requested gene.
<!-- api:end -->
The function library returns DataFrames and Figures. The CLI loads the same library and owns reports and file writes. R runs in a temporary directory using Matrix Market, feature/sample identifiers and metadata. No R intermediate is a permanent CLI output.
Feature-by-sample expression CSV and a clinical CSV containing unique sample, nonnegative time and binary event.
CLI outputs:
python skills/bulkrna/bulkrna-survival/bulkrna_survival.py --demo --output /tmp/bulkrna_survival_demo
Run the script with `--help` for real-input arguments.
`matplotlib`, `numpy`, `pandas`, `scipy`, `survival`, `Matrix`
Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper.
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when discovering bulk gene co-expression modules and hub genes with R WGCNA. Skip direct expression contrasts (use…
Load when comparing gene expression between two conditions in bulk RNA-seq count data. Skip
Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list. Skip when
Load when converting Ensembl, Entrez or symbol IDs in a bulk RNA count matrix using an explicit mapping or a small human demo…