Skip to contents

scSidekick 1.2.0

AI assistant

  • New AskSidekick() - a documentation-grounded help assistant for scSidekick itself (“which function do I need”, “which column is Age?”, “how do I recreate this figure?”). Reads a screenshot or saved PDF, matches the file’s own path against each function’s characteristic output naming (deterministic, not a style guess), and checks any gene/column names it proposes against the actual object afterward - a same_dataset argument controls how strict that check is. Backend is Google Gemini’s free tier via ellmer (Suggests only); its documentation context is built from your installed copy on first use and cached by version, so it never quotes a stale signature and needs no bundled asset or manual release-day rebuild.
  • New RebuildSidekickContext() forces that cache to rebuild - rarely needed outside active scSidekick development.

Reporting and reproducibility

  • Every Run*() function’s saved analysis_params.json methods text now opens with an explicit scSidekick::FunctionName() (RRID:SCR_028835) citation, so a manuscript’s methods section can cite the exact tool used, not just the underlying algorithm packages (fgsea, CellChat, …).
  • .write_subdir_params() now amends rather than overwrites: two different Run*() calls writing into the same output_dir both keep their saved fields, instead of the second call silently replacing the first’s.
  • New SummarizeMethods() - recursively collects every saved methods paragraph under a folder into one titled, ready-to-quote text file (opening with the package’s RRID citation), deduplicating text inherited across parent/sub-folder files. Falls back to ExtractMethods() on a supplied Seurat object when the base preprocessing paragraph was never saved. Section titles are derived from each field’s name, with a content-based fallback for files whose field predates a later naming convention.
  • AskSidekick() is methods-aware: asked what to write in a methods section, it quotes a real, previously-saved paragraph for that function verbatim when the object’s own output_dir has one, and otherwise falls back to a genuine, documentation-grounded description (the same fallback ExtractMethods()/SummarizeMethods() use) rather than declining the question.

Visualization

Bug fixes

  • PlotDimPlots(): centroid labels were always numeric regardless of number_labels, even when number_labels = FALSE.
  • PlotMetaSummary(): row_variable was missing from the auto-generated file name, so a row-stratified run could silently overwrite an unstratified one in the same output_dir.
  • PlotFeatureTrend()’s own documentation contradicted itself - the description implied group.by colored the trend, while its @param entry said it only restricted cells - and the donor-level aggregation step only checked for a literal color.by, which would have silently dropped the color grouping once group.by became a valid coloring fallback.
  • PlotTrajectory(): with split.by/row.by, the legend was pinned to the right regardless of legend.side - patchwork::wrap_plots(guides = "collect") doesn’t inherit each panel’s own legend position, it needs an explicit re-theme on the assembled result. Also fixed a crash when a split x row combination had zero cells, and legend.side = "top" silently collapsing to "bottom".

Documentation

  • New vignette: AskSidekick - AI Documentation Assistant.
  • example_workflow.Rmd is now a real package vignette (it was missing VignetteIndexEntry/VignetteEngine/VignetteEncoding and used html_notebook instead of rmarkdown::html_vignette, so it never built or appeared in browseVignettes() despite showing up on the pkgdown site).

scSidekick 1.1.0

Pathway analysis

  • RunGSEA() NES heatmaps now show significance stars (*/**/*** by padj), previously computed but never drawn.
  • RunGSEA(), RunGSEA_pseudobulk(), and RunSCssGSEA() now write every run into its own timestamped subfolder under output_dir by default (timestamp = TRUE), with a resume / resume_folder system that scans for a previous run with matching parameters and reuses it - resume = TRUE prompts when several match, resume = "last" picks the most recent automatically. The literal function call (as typed, with argument values) is also now recorded in each run’s methods JSON.
  • RunGSEA_pseudobulk() gains use.padj to choose raw p vs. BH-adjusted p as both the significance-star basis and the heatmap-selection cutoff for its main NES heatmaps (the ssGSEA sub-step already had this); legend text now correctly reflects whichever basis was actually used instead of always saying “BH-adjusted.”
  • RunGSEA_pseudobulk() adds a design-rank diagnostic (stats::alias()-based) that explains why a given covariates + contrast.by/group.by combination produces “coefficients not estimable” - typically a confound between a covariate and the contrast, not a bug.
  • RunSCssGSEA():
    • search_terms no longer gets silently bypassed when gene_sets is supplied manually - it now filters custom gene set names too, matching RunGSEA() / RunGSEA_pseudobulk() behavior.
    • New pathway_sets argument fetches and pools multiple MSigDB collections in one run (the same named-list format RunGSEA() uses), instead of being limited to a single gene_set_library / gene_set_subcategory pair.
    • New assay argument (default "RNA") makes the function actually BPCells/sketch-aware as documented - previously hardcoded to "RNA" with no way to score a Seurat v5 sketch-subsampled assay.
    • New use.padj toggle and pathways argument (manual pathway override, with UCell "_UCell"-suffix-tolerant matching) for the significance heatmap.
    • Corrected boxplot legend text: pairwise p-value brackets are raw (unadjusted) t-test p-values via ggpubr, not BH-corrected as previously (incorrectly) stated.

Cell-cell communication

  • RunCellChat()’s per-pathway multi-panel PDF gains a gene-level ligand-receptor chord diagram (CellChat::netVisual_chord_gene()) showing individual ligand/receptor genes by sender/receiver cell type, alongside the existing pathway-aggregate chord diagram.

Visualization

  • PlotMetaSummary() Table 1 output now includes a table-specific legend (in-table footnote + .legend sidecar) stating exactly which statistical test was used per variable type, instead of an unexplained bare p-value column. New numeric_stat, cat_display, and separate_tables arguments.
  • GroupHeatmap() gains a timestamp argument to version repeated PDF saves instead of overwriting; legend_side now moves both the color legend and annotation legends together.
  • PlotFeatureTrend() gains donor.by (collapse to one point per donor before fitting - the honest way to relate a donor-level variable to a per-cell value), add_cor / cor_method (correlation coefficient and p-value annotation via ggpubr::stat_cor()), and show_points / point_size / point_alpha (overlay raw observations and train the y-axis on the full data range).

Bug fixes

scSidekick 1.0.0

Initial release.

Project setup

  • PrepObject() stores project-level settings (output directory, object name, assay type, donor column, colors) directly on the Seurat object so every downstream function can resolve them automatically.
  • GenerateDirectories() creates a standard analysis folder tree.
  • LoadSamplesRNA() + PlotQCMetrics() load and QC-plot one or more 10x libraries, with doublet detection (scDblFinder) and ambient RNA filtering (miQC).

Dimensionality reduction and UMAP

Visualization

Spatial transcriptomics

Composition and metadata

Cell annotation

Pathway analysis

CellChat

Copy number variation

  • RunCopyKAT() — CopyKAT CNV inference with result integration onto the Seurat object.
  • RunInferCNV() — inferCNV pipeline wrapper.

Coexpression

Consensus NMF

  • RunCNMF() — cNMF factorization over a K range via reticulate; writes k-selection diagnostic PNG.
  • GetCNMFPrograms() — consensus solution for a chosen K; stores usage matrix as a DimReduc and gene spectra in @misc$cnmf.
  • GetCNMFTopGenes() — extract top genes per cNMF program.

Upstream regulator analysis

  • RunURA() — upstream regulator analysis on DE gene lists.

Survival analysis

  • SurvPlot() — Kaplan-Meier survival analysis for bulk RNA-seq or TCGA data; supports gene-level and gene-set-signature stratification, median/quartile/ optimal splitting, row x column faceting by clinical metadata, and multivariate Cox regression.
  • LoadTCGA() / EnrichTCGAMeta() — download and annotate TCGA cohorts via recount3 or TCGAbiolinks.
  • SurvMetaSummary() — tabular summary of clinical metadata for a cohort.

Reporting and reproducibility

  • ExtractMethods() — auto-generates a Methods paragraph from settings stored on the Seurat object via log_analysis_params().
  • log_analysis_params() / log_figure_legend() — write analysis parameters and figure legends to JSON/text files alongside output PDFs.
  • create_analysis_pptx() — assembles a PowerPoint summary deck from a folder of PDFs; supports section filtering and aspect-ratio-preserving layout.
  • start_session_logger() / summarize_r_session() — passive session logging and post-hoc markdown + R-script summarizer.
  • Every plotting function writes a .txt legend sidecar alongside each output PDF containing a full figure legend with observation counts (cells, nuclei, spots, or bins), donor/sample counts, and dataset context.

Colors and theme