Question: lfcShrink function in DEseq2 is giving me an error
0
gravatar for Fawzi Yassine
5 weeks ago by
Fawzi Yassine10 wrote:

Hi,

lfcShrink function in DEseq2 is giving me the following error: Error in lfcShrink(dds = dds, res = res_deseq2) : res should be a DESeqResults object, for GRanges output use 'format'

My code is:

dds = DESeqDataSetFromMatrix(countData = count_data, colData = pheno_data, design = ~ genotype)
dds = DESeq(dds)

res_deseq2 = results(dds, contrast = c("genotype", "Friedreichs_ataxia","Control"), tidy = TRUE)
lfcShrink_res_deseq2 = lfcShrink(dds=dds, contrast = c("genotype", "Friedreichs_ataxia","Control"), res = res_deseq2)

My DEseq2 is 1.2.22

rna-seq • 140 views
ADD COMMENTlink modified 4 weeks ago • written 5 weeks ago by Fawzi Yassine10

Is your version v1.2.22 or the current version (as of writing, 18th March 2019), v1.22.2?

What is the output of:

typeof(res_deseq2)
class(res_deseq2)

?

Also, please paste the output of sessionInfo()

ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by Kevin Blighe41k
3
gravatar for ATpoint
5 weeks ago by
ATpoint15k
Germany
ATpoint15k wrote:

Using results with tidy=T will coerce it to data.frame (see ?results), but lfcShrink wants GRanges as suggested in the error message. Use tidy=F or don't specify it at all as GRanges is default.

Error in lfcShrink(dds = dds, res = res_deseq2) : res should be a DESeqResults object, for GRanges output use 'format'

ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by ATpoint15k

Problem solved. Please, can you check this https://www.biostars.org/p/370268/?

ADD REPLYlink written 4 weeks ago by Fawzi Yassine10

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.
. Upvote|Bookmark|Accept

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by genomax65k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1858 users visited in the last hour