lfcShrink giving error
1
0
Entering edit mode
angkoo ▴ 10
@angkoo-23537
Last seen 2.3 years ago
United Kingdom

Hi there,

I am having issues with lfcShrink:

res <- lfcShrink (dds, contrast =c("zone", "transition", "peripheral"), res = w_res)

Error in lfcShrink(dds, contrast = c("zone", "transition", "peripheral"), : type='apeglm' shrinkage only for use with 'coef'

Please help.

deseq2 • 834 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 23 days ago
Republic of Ireland

When using lfcShrink() with type='apeglm', which is now the default method, you cannot specify a contrast. Instead, you have to set the value of the coef parameter, and its value must be one of the coefficients output by the following command:

resultsNames(dds)

If you want to use a contrast, then use the original shrinkage method by running:

res <- lfcShrink (dds, contrast =c("zone", "transition", "peripheral"), res = w_res, type = 'normal')

Kevin

ADD COMMENT
0
Entering edit mode

When I put:

resultsNames(dds)

I get:

[1] "Intercept" "zonetransitionvs_peripheral"

How do I use this for lfcShrink()?

ADD REPLY
0
Entering edit mode

This is your friend for all queries DESeq2-related: Quick start

ADD REPLY
1
Entering edit mode

Thanks :) This is really helpful

ADD REPLY
1
Entering edit mode

Also for questions about a specific function, before posting make sure you read over ?lfcShrink and try the examples. Also search the vignette for the function name and read sections that relate to the function.

ADD REPLY

Login before adding your answer.

Traffic: 837 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