This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DESeq2 analysis of two tissues with 3 different conditions

Hi, these are my very first steps in RNAseq and for the first time in my life I am trying to use a DESeq2 package in R, and I am trying to figure out how can I "sort" my results if I have two tissues (intestine and brain) and for each tissue I have 3 conditions - "control", "black" and "white". Means I have a column "tissue" (for intestine and brain) and I have "state" (for my 3 conditions)

If I understood it well - I have to start from that:

dds <- DESeqDataSetFromMatrix(
countData = GeneCounts,
colData = colData,
design = ~ tissue + state )

dds <- DESeq(dds) 

res <- results(dds)

That would be the "default" way but when I am trying to do

res1 <- results(dds, contrast=c("tissue","white","control"))

for example for the "white-control" pair I have the following error message:

Error in cleanContrast(object, contrast, expanded = isExpanded, listValues = listValues,  : 
  white and control should be levels of tissue such that tissue_white_vs_brain and tissue_control_vs_brain are contained in 'resultsNames(object)'

Can anyone please explain what that suppose to mean?

Thank you!

deseq2 r rna-seq

1 answer

Reading the vignettes and tutorials is not enough. You need to work through examples. You also need to ask yourself "exactly what am I trying to compare to what?" Because that results command makes no sense.

Log in to answer this question.