Function which prepares a timepoint model matrix for limma datasets

The function creates either a conditional matrix (do_temporal==FALSE) where the model matrix will compare both conditions ex: WT vs Knockout Or it will create a model for a temporal comparison, where it will compare the two timpoints contained in 'groups_in_ts'

The function is meant to be used within a wrapper function

prep_tp_matrix(
  time_object,
  groups_in_ts,
  target_tp = NULL,
  do_temporal = FALSE
)

Arguments

time_object

A time series object

groups_in_ts

Vector of the two groups/conditionals

target_tp

Vector containing the two timepoints to compare

do_temporal

boolean indication if the model matrix should be temporal or conditional

Value

a list contianing the model matrix and the subsets used