DESeq2, lfcShrink, "Error in results(dds.shr, name = coefAlpha) : object 'coefAlpha' not found"
1
0
Entering edit mode
lychen83 • 0
@lychen83-14436
Last seen 6.9 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

deseq2 • 1.9k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 10 days ago
United States

Thanks for reporting this bug.

What version of DESeq2 are you using? 

packageVersion("DESeq2")

I can't reproduce this error with my version (1.18.1). Once I can reproduce it, I can try to find a solution.

dds <- makeExampleDESeqDataSet()
dds <- DESeq(dds)
res <- results(dds)
lfc <- lfcShrink(dds, contrast=c("condition","B","A"), res=res)
ADD COMMENT

Login before adding your answer.

Traffic: 826 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6