
Changelog
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 - asame_datasetargument controls how strict that check is. Backend is Google Gemini’s free tier viaellmer(Suggestsonly); 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 savedanalysis_params.jsonmethods text now opens with an explicitscSidekick::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 differentRun*()calls writing into the sameoutput_dirboth 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 toExtractMethods()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 ownoutput_dirhas one, and otherwise falls back to a genuine, documentation-grounded description (the same fallbackExtractMethods()/SummarizeMethods()use) rather than declining the question.
Visualization
- Consistent
split.by/row.byfaceting,file_name/width/height/timestampPDF-saving controls, and auto-generated-filename correctness (every grouping/splitting variable in the call is now reflected in the default file name) acrossPlotTrajectory(),PlotDimPlots(),PlotFeaturePlots(),PlotSpatialFeaturePlots(),PlotSpatialDimPlots(),PlotMasterMaps(),PlotComposition(),PlotPieUMAP(),PlotVolcano(),PlotGSEAEnrichment(),PlotEnrichment(),PlotMultiFeature(),PlotPathwayButterfly(),PlotFeature(),PlotMetaSummary(),PlotCorrelation(),RunGSEA(), andRunGSEA_pseudobulk()- previously present on some of these and missing from others. -
PlotTrajectory()gainssplit.by/row.by(previously the only plotting function without them) andnumber_labels, matchingPlotDimPlots(). -
PlotPseudotime()redesigned:plot.type = c("density", "ridge")replaces the old behavior wheresplit.bysilently did nothing to the density panel and instead bolted on an unrelated second ridge plot.split.by/row.bynow facet either style into real column/row panels, the same way as every other scSidekick plotting function. -
PlotFeatureTrend()gainssplit.by/row.by, andgroup.bynow colors the trend by default (falling back only whencolor.byis set), matching every other scSidekick function’s convention -groupsstill restricts which cells are plotted regardless of which variable ends up coloring the plot.
Bug fixes
-
PlotDimPlots(): centroid labels were always numeric regardless ofnumber_labels, even whennumber_labels = FALSE. -
PlotMetaSummary():row_variablewas missing from the auto-generated file name, so a row-stratified run could silently overwrite an unstratified one in the sameoutput_dir. -
PlotFeatureTrend()’s own documentation contradicted itself - the description impliedgroup.bycolored the trend, while its@paramentry said it only restricted cells - and the donor-level aggregation step only checked for a literalcolor.by, which would have silently dropped the color grouping oncegroup.bybecame a valid coloring fallback. -
PlotTrajectory(): withsplit.by/row.by, the legend was pinned to the right regardless oflegend.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, andlegend.side = "top"silently collapsing to"bottom".
Documentation
- New vignette: AskSidekick - AI Documentation Assistant.
-
example_workflow.Rmdis now a real package vignette (it was missingVignetteIndexEntry/VignetteEngine/VignetteEncodingand usedhtml_notebookinstead ofrmarkdown::html_vignette, so it never built or appeared inbrowseVignettes()despite showing up on the pkgdown site).
scSidekick 1.1.0
Pathway analysis
-
RunGSEA()NES heatmaps now show significance stars (*/**/***bypadj), previously computed but never drawn. -
RunGSEA(),RunGSEA_pseudobulk(), andRunSCssGSEA()now write every run into its own timestamped subfolder underoutput_dirby default (timestamp = TRUE), with aresume/resume_foldersystem that scans for a previous run with matching parameters and reuses it -resume = TRUEprompts 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()gainsuse.padjto 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 givencovariates+contrast.by/group.bycombination produces “coefficients not estimable” - typically a confound between a covariate and the contrast, not a bug. -
RunSCssGSEA():-
search_termsno longer gets silently bypassed whengene_setsis supplied manually - it now filters custom gene set names too, matchingRunGSEA()/RunGSEA_pseudobulk()behavior. - New
pathway_setsargument fetches and pools multiple MSigDB collections in one run (the same named-list formatRunGSEA()uses), instead of being limited to a singlegene_set_library/gene_set_subcategorypair. - New
assayargument (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.padjtoggle andpathwaysargument (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 +.legendsidecar) stating exactly which statistical test was used per variable type, instead of an unexplained bare p-value column. Newnumeric_stat,cat_display, andseparate_tablesarguments. -
GroupHeatmap()gains atimestampargument to version repeated PDF saves instead of overwriting;legend_sidenow moves both the color legend and annotation legends together. -
PlotFeatureTrend()gainsdonor.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 viaggpubr::stat_cor()), andshow_points/point_size/point_alpha(overlay raw observations and train the y-axis on the full data range).
Bug fixes
- Fixed a docs/export regression in
R/pseudobulk.Rwhere a private helper had absorbedPlotPseudoBulk()’s roxygen block, causingPlotPseudoBulk()to silently lose its@exportand documentation. -
PlotFeaturePlots(),PlotMasterMaps(),PlotSpatialDimPlots(), andPlotSpatialFeaturePlots()are the primary documented names again (?now resolves directly for each), withGenerateFeatureMaps(),GenerateMasterGeneMaps(),GenerateSpatialDimMaps(), andGenerateSpatialFeatureMaps()kept as long-form aliases - matching how they’re actually referenced everywhere else in the package (README, vignettes). Previously the doc pages were filed under the long-form names, and a strayman/.gitignorehad excluded 3 of the 4 doc pages from git entirely.
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
-
Determine_nDims()selects the number of PCs via elbow or JackStraw. -
PlotDimPlots()batch-generates labeled and split UMAP PDFs. -
PlotGridUMAP()arranges multiple feature UMAPs in a grid.
Visualization
-
FastDotPlot()/FastDotPlot2()— dot plots with flexible grouping and split panels. -
SplitDotPlot()/SplitDotPlot2()— side-by-side dot plots across conditions. -
StackedVlnPlot()— compact stacked violin plot. -
GroupHeatmap()— pseudobulk mean-expression heatmap by group. -
GenerateFeatureMaps()/GenerateMasterGeneMaps()/PlotMultiFeature()— batch feature expression maps. -
PlotVolcano()— styled volcano plot for differential expression results.
Spatial transcriptomics
-
GenerateSpatialDimMaps()andGenerateSpatialFeatureMaps()produce publication-ready spatial plots for Visium and VisiumHD data with correct spot/bin terminology.
Composition and metadata
-
PlotComposition()— stacked bar charts of cell type composition. -
PlotPieUMAP()— pie-chart overlays on UMAP embeddings. -
PlotAlluvial()— alluvial / Sankey diagrams across conditions. -
PlotRose()— rose (polar bar) charts. -
PlotChord()— chord diagrams via circlize. -
PlotTrendAndUMAP()/PlotTrendLabeled()— composition trend plots. -
PlotAtlasWheel()— circular dataset overview wheel. -
SummarizeMetadata()/ChartBuilder()— flexible metadata summary charts.
Cell annotation
-
CellTypeAssignmentHelper()— supervised annotation with SingleR + manual override, writes labeled UMAP PDFs. -
AnnotateFeatures()— marker-gene-based annotation overlay. -
CheckSex()— infers biological sex from XIST / Y-chromosome expression.
Pathway analysis
-
RunGSEA()— GSEA on cluster markers using fgsea; supports msigdbr and enrichR databases; writes lollipop and NES heatmap PDFs. -
RunGSEA_pseudobulk()— pseudobulk GSEA with edgeR DE; lollipop, NES heatmap, and ssGSEA scoring outputs. -
RunSCssGSEA()— single-cell ssGSEA scoring with heatmap and box plot. -
VisualizeLeadingEdge()— heatmap of leading-edge genes for selected pathways. -
PlotPathwayButterfly()— two-axis cell state hierarchy scatter plot (adapted from Suva Lab scrabble scorer). -
RunEnrichment()/PlotEnrichment()— over-representation analysis. -
PlotGSEAEnrichment()— enrichment curve plots for individual pathways.
CellChat
-
RunCellChat()— end-to-end CellChat pipeline with circle plots, bubble plots, and communication pattern outputs. -
CompareCellChat()— differential interaction comparison across conditions. -
RankCellChatPathways()— pathway-level signaling strength ranking. -
RenameCellTypeInCC()— rename a cell type across a CellChat list. -
PlotPctHeatmap()— percent-expressing heatmap for receptor/ligand genes.
Copy number variation
-
RunCopyKAT()— CopyKAT CNV inference with result integration onto the Seurat object. -
RunInferCNV()— inferCNV pipeline wrapper.
Coexpression
-
CorrelateGene()+PlotCorrelation()— gene-gene and gene-metadata correlation analysis.
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 vialog_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
.txtlegend 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
-
Nour_pal(),scale_color_Nour(),scale_fill_Nour()— custom color palettes (Nour18,Nour20) with ggplot2 scale functions. -
theme_NourMin()— minimalist ggplot2 theme. -
ShowColors()/GetColors()— inspect and retrieve per-object color assignments.