Hello, First, I know that DESeq2 is not meant to be run without replicates and results will not be meaningful. However, I have replicates (n=>30) in one group (N), while another group (T) has only a single sample. This is the requirement of the project. I run the DESeq2 without any error and I found a change in the expression of ~9000 genes (padj < 0.05). I am sharing the script and don't if I am doing the correct or not.
library(DESeq2) require(data.table) require(tidyverse) sampleinfo <- read.delim("design.txt") raw <- data.table::fread(count.txt) genes <- pull(raw,ID) cts <- as.matrix(raw[,-1]) rownames(cts) <- genes #DESeq2 object dds <- DESeqDataSetFromMatrix(countData = cts, colData = sampleinfo, design = ~condition) dds <- estimateSizeFactors(dds) idx <- rowSums( counts(dds, normalized=TRUE) >= 10 ) >= 3 dds <- dds[idx,] dds <- DESeq(dds) res <- results(dds, contrast=c("condition","T","N")) #convert row names into first column d <- res ID <- rownames(d) rownames(d) <- NULL data <- cbind(ID,d) #Drop columns which are not required data <- subset(data, select = -c(2, 4:7)) write.table(data, file="2.txt", quote = F, sep = "\t", row.names = F)
I would like to know, if possible then from creator Michael Love if I am doing it correctly or not? Thanks in advance.