
Collect every saved methods paragraph into one quotable text file
SummarizeMethods.RdRecursively scans output_dir for every analysis_params.json written by
scSidekick's Run*() functions and log_analysis_params(), pulls out
every distinct methods-text paragraph (the base preprocessing summary plus
each method-specific one - GSEA, CellChat, Slingshot, cNMF, ...),
deduplicates text that got inherited into multiple sub-folder files via
the shared-base merge (see log_analysis_params()), and writes the result
as one clean, ready-to-quote text file - one paragraph per analysis step,
in the order those steps were actually run.
Arguments
- output_dir
Character. Top-level folder to search (recursively) for
analysis_params.jsonfiles.- seurat_object
A Seurat object, optional. Used as a fallback: if no
analysis_params.jsonis found anywhere underoutput_dir(or none of the files found include the base preprocessing paragraph - e.g.log_analysis_params()/PrepObject()was never called even though individualRun*()steps were), the base paragraph is reconstructed directly from the object's own command history viaExtractMethods().- out_file
Character or
NULL. Where to write the combined methods text.NULL(default) saves"Methods_Summary.txt"insideoutput_dir.- recursive
Logical. Search subfolders of
output_dirtoo. DefaultTRUE.
Examples
if (FALSE) { # \dontrun{
# After running PrepObject(), RunGSEA(), RunCellChat(), etc. into the
# same project folder:
SummarizeMethods("./Figures")
# If the base preprocessing paragraph was never saved (no PrepObject()/
# log_analysis_params() call), reconstruct it from the object:
SummarizeMethods("./Figures", seurat_object = SeuratObj)
} # }