I have this data set:
> colData(dds_WT) |> as.data.frame()
id sample cell_line time_point treatment Condition replicate
WT0h_1 1 WT0h_1 WT 0 none WT_0h_none 1
WT0h_2 2 WT0h_2 WT 0 none WT_0h_none 2
WT0h_3 3 WT0h_3 WT 0 none WT_0h_none 3
WT24h_CpG_13 13 WT24h_CpG_13 WT 24 CpG WT_24h_CpG 1
WT24h_CpG_14 14 WT24h_CpG_14 WT 24 CpG WT_24h_CpG 2
WT24h_CpG_15 15 WT24h_CpG_15 WT 24 CpG WT_24h_CpG 3
WT24hns_7 7 WT24hns_7 WT 24 none WT_24h_none 1
WT24hns_8 8 WT24hns_8 WT 24 none WT_24h_none 2
WT24hns_9 9 WT24hns_9 WT 24 none WT_24h_none 3
WT6h_CpG_10 10 WT6h_CpG_10 WT 6 CpG WT_6h_CpG 1
WT6h_CpG_11 11 WT6h_CpG_11 WT 6 CpG WT_6h_CpG 2
WT6h_CpG_12 12 WT6h_CpG_12 WT 6 CpG WT_6h_CpG 3
WT6hns_4 4 WT6hns_4 WT 6 none WT_6h_none 1
WT6hns_5 5 WT6hns_5 WT 6 none WT_6h_none 2
WT6hns_6 6 WT6hns_6 WT 6 none WT_6h_none 3
genotype
WT0h_1 WT_0h_none
WT0h_2 WT_0h_none
WT0h_3 WT_0h_none
WT24h_CpG_13 WT_24h_CpG
WT24h_CpG_14 WT_24h_CpG
WT24h_CpG_15 WT_24h_CpG
WT24hns_7 WT_24h_none
WT24hns_8 WT_24h_none
WT24hns_9 WT_24h_none
WT6h_CpG_10 WT_6h_CpG
WT6h_CpG_11 WT_6h_CpG
WT6h_CpG_12 WT_6h_CpG
WT6hns_4 WT_6h_none
WT6hns_5 WT_6h_none
WT6hns_6 WT_6h_none
(and the same number of of samples for a KO (defined in the cell_line
column - see below for full colData()
)
I would like to do a time-series analysis, but for time-point 0 I have only non-treated samples. When I build the two models e.g.
design(dds_WT) <- ~ 0 + time_point + time_point:treatment
reduced_design <- ~ 0 + time_point # The coefficients for treatment and time_point:treatment are all zero.
If i understand it correctly, I added the ~0
to compensate for that fact. But when I run the DESEq()
command I get the error
Error in designAndArgChecker(object, betaPrior) :
full model matrix is less than full rank
Am I building the correct models? or where Do I make an error?
thanks in advance for helping
new("DFrame", rownames = c("Il4i1ko0h_16", "Il4i1ko0h_17", "Il4i1ko0h_18",
"Il4i1ko24h_CpG_28", "Il4i1ko24h_CpG_29", "Il4i1ko24h_CpG_30",
"Il4i1ko24hns_22", "Il4i1ko24hns_23", "Il4i1ko24hns_24", "Il4i1ko6h_CpG_25",
"Il4i1ko6h_CpG_26", "Il4i1ko6h_CpG_27", "Il4i1ko6hns_19", "Il4i1ko6hns_20",
"Il4i1ko6hns_21", "WT0h_1", "WT0h_2", "WT0h_3", "WT24h_CpG_13",
"WT24h_CpG_14", "WT24h_CpG_15", "WT24hns_7", "WT24hns_8", "WT24hns_9",
"WT6h_CpG_10", "WT6h_CpG_11", "WT6h_CpG_12", "WT6hns_4", "WT6hns_5",
"WT6hns_6"), nrows = 30L, elementType = "ANY", elementMetadata = new("DFrame",
rownames = NULL, nrows = 8L, elementType = "ANY", elementMetadata = NULL,
metadata = list(), listData = list(type = c("input", "input",
"input", "input", "input", "input", "input", "input"), description = c("",
"", "", "", "", "", "", ""))), metadata = list(), listData = list(
id = c(16L, 17L, 18L, 28L, 29L, 30L, 22L, 23L, 24L, 25L,
26L, 27L, 19L, 20L, 21L, 1L, 2L, 3L, 13L, 14L, 15L, 7L, 8L,
9L, 10L, 11L, 12L, 4L, 5L, 6L), sample = c("Il4i1ko0h_16",
"Il4i1ko0h_17", "Il4i1ko0h_18", "Il4i1ko24h_CpG_28", "Il4i1ko24h_CpG_29",
"Il4i1ko24h_CpG_30", "Il4i1ko24hns_22", "Il4i1ko24hns_23",
"Il4i1ko24hns_24", "Il4i1ko6h_CpG_25", "Il4i1ko6h_CpG_26",
"Il4i1ko6h_CpG_27", "Il4i1ko6hns_19", "Il4i1ko6hns_20", "Il4i1ko6hns_21",
"WT0h_1", "WT0h_2", "WT0h_3", "WT24h_CpG_13", "WT24h_CpG_14",
"WT24h_CpG_15", "WT24hns_7", "WT24hns_8", "WT24hns_9", "WT6h_CpG_10",
"WT6h_CpG_11", "WT6h_CpG_12", "WT6hns_4", "WT6hns_5", "WT6hns_6"
), cell_line = c("Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko",
"Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko",
"Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko", "Il4i1ko", "WT",
"WT", "WT", "WT", "WT", "WT", "WT", "WT", "WT", "WT", "WT",
"WT", "WT", "WT", "WT"), time_point = c(0L, 0L, 0L, 24L,
24L, 24L, 24L, 24L, 24L, 6L, 6L, 6L, 6L, 6L, 6L, 0L, 0L,
0L, 24L, 24L, 24L, 24L, 24L, 24L, 6L, 6L, 6L, 6L, 6L, 6L),
treatment = c("none", "none", "none", "CpG", "CpG", "CpG",
"none", "none", "none", "CpG", "CpG", "CpG", "none", "none",
"none", "none", "none", "none", "CpG", "CpG", "CpG", "none",
"none", "none", "CpG", "CpG", "CpG", "none", "none", "none"
), Condition = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L,
3L, 4L, 4L, 4L, 5L, 5L, 5L, 6L, 6L, 6L, 7L, 7L, 7L, 8L, 8L,
8L, 9L, 9L, 9L, 10L, 10L, 10L), levels = c("Il4i1ko_0h_none",
"Il4i1ko_24h_CpG", "Il4i1ko_24h_none", "Il4i1ko_6h_CpG",
"Il4i1ko_6h_none", "WT_0h_none", "WT_24h_CpG", "WT_24h_none",
"WT_6h_CpG", "WT_6h_none"), class = "factor"), replicate = c(1L,
2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L,
2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L),
genotype = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L,
4L, 4L, 4L, 5L, 5L, 5L, 6L, 6L, 6L, 7L, 7L, 7L, 8L, 8L, 8L,
9L, 9L, 9L, 10L, 10L, 10L), levels = c("Il4i1ko_0h_none",
"Il4i1ko_24h_CpG", "Il4i1ko_24h_none", "Il4i1ko_6h_CpG",
"Il4i1ko_6h_none", "WT_0h_none", "WT_24h_CpG", "WT_24h_none",
"WT_6h_CpG", "WT_6h_none"), class = "factor")))