**620**wrote:

We have a very simple experiment, 1 control (C) and 3 independent treatments (T, B, A). So technically I wrote the following script thinking it would compare C to T, then C to B and finally C to A.

Though at the bottom of my pipeline, it seems that DESeq2 is comparing treatments T vs A. Is there a better way to write the condition so it would compare independentely control to each treatment ? (After that I should cluster genes and output a heatmap)

`# DESeq1 libraries`

library( "DESeq2" )

library("Biobase")

# Heatmap libraries

library( "genefilter" )

library(gplots)

`r2 = read.table("matrix.txt", header=TRUE, row.names=1)`

head(r2)

samples <- data.frame(row.names=c("C1", "T1", "B1", "A1"), condition=as.factor(c("C1", "T1", "B1", "A1")))

dds <- DESeqDataSetFromMatrix(countData = as.matrix(r2), colData=samples, design=~condition)

`# Run DESeq2`

dds <- DESeq(dds)

`# DESeq2 Results`

res <- results(dds)

head (res)

`**********`

mcols(res, use.names=TRUE)

> mcols(res, use.names=TRUE)

DataFrame with 6 rows and 2 columns

type description

<character> <character>

baseMean intermediate the base mean over all rows

log2FoldChange results log2 fold change (MAP): **condition T1 vs A1**

lfcSE results standard error: **condition T1 vs A1**

stat results Wald statistic: **condition T1 vs A1**

pvalue results Wald test p-value: **condition T1 vs A1**

padj results BH adjusted p-values

**98k**• written 6.5 years ago by madkitty •

**620**