Skip to contents

The design of the polynomial model of sc.set.poly().

Value

An object of class MatrixDesign: the design of the polynomial model, which sc.set.poly() stores in the Design slot of a ScMaSigPro object, with the offsets that sc.p.vector() adds. predictors() and pathAssign() return its matrices.

Details

validObject() checks that assignment_matrix has the rows of predictor_matrix (one per bin), that offset is empty or has one value per row and that groups.vector has one value per column of predictor_matrix.

Slots

predictor_matrix

The design matrix: one row per bin, one column per term (predictors()).

groups.vector

The path of each column of predictor_matrix: the reference path for its powers of pseudotime, <path>vs<ref> for the terms of another path.

assignment_matrix

The path assignment matrix: one row per bin, with the binned pseudotime, a replicate index and a 0/1 column per path (pathAssign()).

offset

The offset of each bin, the logarithm of its size factor (see sc.p.vector()), or an empty vector when the fits used no offset or no fit was made yet.

Examples

data("scmp.ob", package = "scMaSigPro")
head(predictors(scmp.ob))
#>             Path2vsPath1 scmp_binned_pseudotime scmp_binned_pseudotimexPath2
#> Path1_bin_1            0                      1                            0
#> Path1_bin_2            0                      2                            0
#> Path1_bin_3            0                      3                            0
#> Path1_bin_4            0                      4                            0
#> Path1_bin_5            0                      5                            0
#> Path1_bin_6            0                      6                            0