Code taken from the DESeq vignette for my own convenience.
library("DESeq")
exampleFile = system.file ("extra/TagSeqExample.tab",package="DESeq")
countsTable = read.delim(exampleFile, header=TRUE, stringsAsFactors=TRUE)
rownames(countsTable) = countsTable$gene
countsTable = countsTable[ , -1]
conds = c("T","T","T","Tb","N","N")
cds = newCountDataSet (countsTable, conds)
cds = cds[,-1]
cds = estimateSizeFactors(cds)
sizeFactors(cds)
cds <- estimateVarianceFunctions( cds )
res <- nbinomTest( cds, "N", "T" )
resSig <- res[ res$padj < .1, ]

This work is licensed under a Creative Commons
Attribution 4.0 International License.