Dear all, I am quite struggling with some sort of coding here. Essentially, what I am trying to do is to simply add the batch variable to my design in DESeq2. Thus, I am doing:
dds$batch = factor(c('1','1','2','2','3','3')) dds <- DESeqDataSetFromTximport(txi.kallisto.tsv, table, ~batch+condition)
but it returns an error message
Error in DESeqDataSet(se, design = design, ignoreRank) : all variables in design formula must be columns in colData
perfect, but when I type
it returns, as expected, two columns:
> colData(dds) DataFrame with 6 rows and 2 columns condition batch <factor> <factor> sample_1 wt 1 sample_2 ko 1 sample_3 wt 2 sample_4 ko 2 ...
Thanks in advance