Entering edit mode
lychen83
•
0
@lychen83-14436
Last seen 7.6 years ago
Hello Michael,
I am new to DESeq2.
I have successfully used the results of function results() to do the plotMA. However, when I try
lfcShrink resLFC <- lfcShrink(dds, constrast = c("condition","control","hydro_phos"),res = res).
I confronted an error:
Error in results(dds.shr, name = coefAlpha) : object 'coefAlpha' not found
My codes are:
setwd("C:/cygwin64/home/Coexpression_Nov2017")
getwd()
library(DESeq2)
library(apeglm)
library(ashr)
expected_matrix <- read.table(file = "17samples_expected_count.txt", sep = "\t", header = TRUE)
condition <- factor(c (rep("control", 3), rep("hydro_heat", 3), rep("hydro_salt", 2), rep("hydro_phos", 3), rep("hydro_drou", 3)))
colData <- data.frame(row.names=colnames(expected_matrix)[5:18], condition=condition)
ddsfm <- DESeqDataSetFromMatrix(countData=round(expected_matrix[,5:18]), colData=colData, design= ~ condition)
row.names(ddsfm) <- expected_matrix[, 1]
ddsfm <- ddsfm[rowSums(DESeq2::counts(ddsfm)) > 10, ]
dds <- DESeq(ddsfm)
res <- results(dds)
res05 <- results(dds, contrast=c("condition","control","hydro_salt"), alpha =0.05)
plotMA(res05, ylim=c(-2,2), alpha =0.05)
resLFC <- lfcShrink(dds, constrast = c("condition","control","hydro_phos"),res = res)
I cannot get any helps about this error.
Could you give me any suggestions.
Best wishes,
Chen
