library("DESeq2") database <- read.table(file = "COS_genes.count_table.xls", sep = "\t", header = T, row.names = 1) countData <- database[,1:15] condition <- factor(c(rep("COS0",3),rep("COS1",3),rep("COS3",3),rep("COS6",3),rep("COS12",3)), levels = c("COS0", "COS1","COS3","COS6","COS12")) countData <- round(as.matrix(countData)) coldata <- data.frame(row.names = colnames(countData), condition) dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), design= ~ condition ) dds <- dds[ rowSums(counts(dds)) > 1, ] dds <- DESeq(dds) res0vs1 <- results(dds, contrast = c("condition","COS1","COS0")) table(res0vs1$pvalue <0.001) res0vs1 <- res0vs1[order(res0vs1$pvalue),] write.table(as.data.frame(res0vs1), file="res0vs1.xls", sep="\t", quote = F) #画图 library(geneplotter) plotMA(res0vs1, main="DESeq2", ylim=c(-2,2))
DESeq2使用流程
by
Tags:
Leave a Reply