Skip to contents

An analysis of the scMaSigPro workflow: the data at the level of the cells and of the pseudotime bins, as two SingleCellExperiment objects, and the results and settings of every step.

Value

An object of class ScMaSigPro. as_scmp() and create_scmp() make one with the cells in the Sparse slot; sc.squeeze() adds the bins (Dense), sc.set.poly() the design (Design), sc.p.vector() the test of each gene (Profile), sc.t.fit() the selected models (Estimate), sc.filter() and sc.cluster.trend() the gene lists and clusters (Significant), and every step its settings (Parameters).

Details

validObject() checks every slot with the validity method of its class and reports each problem with the name of the slot; version must be a single version number. The constructors, the steps of the workflow, pb_counts() and the setters check the object they return, so a step or setter that would return an invalid object stops with these problems instead. Objects saved by an earlier version of the package, for example with saveRDS(), are brought up to date with updateObject().

Slots

Sparse

The cells: a SingleCellExperiment with their counts and metadata, including the pseudotime and path columns.

Dense

The pseudotime bins: a SingleCellExperiment with their pseudo-bulk counts and metadata.

Design

The design, a MatrixDesign object.

Profile

The test of each gene, a VariableProfiles object.

Estimate

The selected models, an Estimates object.

Significant

The gene lists and clusters, a Significant object.

Parameters

The settings, a ParameterConfig object.

version

The version of scMaSigPro that created the object or last changed its structure in updateObject().

Why a class of its own

ScMaSigPro holds two SingleCellExperiment objects because the analysis works at two resolutions whose columns differ. Sparse holds the cells, with their pseudotime and path labels. Dense holds the pseudotime bins (the pseudo-bulk) to which the polynomial GLMs are fitted. One SingleCellExperiment cannot hold both: altExp() needs the columns of the main experiment, and bins stored in metadata() would lose the validity checks and accessors of an experiment. The other slots hold results that have no place in the SummarizedExperiment model: the design matrices (MatrixDesign), the per-gene fits of the full model (VariableProfiles), the coefficients and significance of the selected models (Estimates), the gene lists and clusters (Significant) and a record of every parameter used (ParameterConfig), for reproducibility. Both experiments are built and changed through the SummarizedExperiment accessors only, and validObject() runs after every step of the workflow. To use the results with other tools, scmpResults() returns them as a DataFrame with one row per gene, and scmpToRowData() writes them into the rowData() of a SingleCellExperiment.

Examples

data("scmp.ob", package = "scMaSigPro")
scmp.ob
#> Class: ScMaSigProClass
#> nCells: 200
#> nFeatures: 100
#> Pseudotime Range: 1 100
#> Branching Paths: Path2, Path1
#> Binned Pseudotime: 1-8(Range), 4.5(Mean), 
#> Number of bins-> Path1: 8 Path2: 8
#> Average bin Size-> Path1: 12 Path2: 13
#> Polynomial Order: 1
#> No. of Significant Profiles: 50
#> No. of Influential Features: 8
validObject(scmp.ob)
#> [1] TRUE