Question: Combination of duplicateCorrelation with arrayWeights to increase power for DE detection in multilevel experiments
0
gravatar for svlachavas
4.1 years ago by
svlachavas740
Greece/Athens/National Hellenic Research Foundation
svlachavas740 wrote:

Dear ALL,

i would like to ask a very specific question regarding the possibility of combining arrayWeights() from limma with duplicateCorrelation(), in order to increase power for differential expression: (is this possible) and especially appropriate ? Without describing again any specific experimental information for an illustrative example, im posting a link to a specific experimental question that i would like to implement it if it is "valid" (Possible methodologies for constructing multi-level comparisons in limma

Or alternatively, it is "more wise" to implement it in limma with a different model construction(along with some general assumptions based on various diagnostic plots and experimental design) without using duplicate correlation ??

Thank you for your consideration on this matter !!

ADD COMMENTlink modified 4.1 years ago by Gordon Smyth39k • written 4.1 years ago by svlachavas740

In  ?duplicateCorrelation() help function it has an argument named weights:

But in the description it mentions 

weights    
"an optional numeric matrix of the same dimension as object containing weights for each spot. If smaller than object then it will be filled out the same size".

Thus, it needs a different argument than from the object that is produced from arrayWeights(), or it is plaucible to use it also here ??

Any confirmation on this would be beneficial !!

ADD REPLYlink written 4.1 years ago by svlachavas740
1

To use duplicateCorrelation() with array weights, you need to expand the array weights to observation weights using asMatrixWeights(), see below.

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by Gordon Smyth39k

Note the second sentence: "If smaller than 'object' then it will be filled out the same size." This is what will happen if you pass array weights to duplicateCorrelation.

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by Ryan C. Thompson7.4k
Answer: Combination of duplicateCorrelation with arrayWeights to increase power for DE d
2
gravatar for Gordon Smyth
4.1 years ago by
Gordon Smyth39k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth39k wrote:

If your data is RNA-seq, then see voomWithQualityWeights().

For microarray data, proceed as follows:

 aw <- arrayWeights(y, design)
 w <- asMatrixWeights(aw, dim(y))
 dupcor <- duplicateCorrelation(y, design, block=block, weights=w)
 fit <- lmFit(y, design, block=block, correlation=dupcor$consensus, weights=w)
ADD COMMENTlink written 4.1 years ago by Gordon Smyth39k

Dear Gordon,

thank you very much for the code provided !! Yes, my data are microarray data-regarding the interpretation of the code i can continue as usual after fit to construct my specific contrasts and move along right ?

ADD REPLYlink written 4.1 years ago by svlachavas740

Dear Gordon,

you are trully an inspiration !! Im posting again because i would like to ask for a small feedback regarding the interpretation of my results. When i used only duplicatedCorrelation() without arrayWeights(), i didnt get any DE with an FDR < 0.05. When i incorporated your above code, it return 1424 DE genes with FDR < 0.05(from the 9884 tested). Thus, in your opinion the big number of DE genes i get now is "valid" ?? I mean, of course my comparison is metastatic cancer samples vs their respective control ones (6 vs 6), but could in the first case the zero number of DE genes attributed to sample quality and also through duplicateCorrelation which could absorved these important differences ?

Here's the total code:

condition <- factor(eset.2$Disease, levels=c("Normal","Cancer"))
pairs <- factor(rep(1:30, each = 2))  # the blocking factor regarding the total number of patients
metastatic <- factor(eset.2$Meta_factor)
f <- paste(condition, metastatic, sep=".")
f <- factor(f)
design1 <- model.matrix(~0 +f)
colnames(design1) <- levels(f)

aw <- arrayWeights(eset.2, design1)
barplot(aw, xlab="Array", ylab="Weight", col="white", las=2) 
abline(h=1, lwd=1, lty=2, col="red")
w <- asMatrixWeights(aw, dim(eset.2))
dupcor <- duplicateCorrelation(eset.2, design1, block=pairs, weights=w)
fit <- lmFit(eset.2, design1, block=pairs, correlation=dupcor$consensus, weights=w)
cm <- makeContrasts(Meta_CancervsMeta_Control="Cancer.1-Normal.1" , levels=design1)
fit2 <- contrasts.fit(fit, cm)
fit3 <- eBayes(fit2, trend=TRUE)

I also share the link to arrayWeights plot :

https://www.dropbox.com/s/yr0zzvebqe7s2nm/arrayWeights_new_design.jpeg?dl=0

Thank you for your consideration on this matter !!

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by svlachavas740
Answer: Combination of duplicateCorrelation with arrayWeights to increase power for DE d
1
gravatar for Ryan C. Thompson
4.1 years ago by
Scripps Research, La Jolla, CA
Ryan C. Thompson7.4k wrote:

arrayWeights does not accept a correlation and blocking structure, and I'm not sure if this is a limitation of the method or simply has not been implemented. But regardless, this means that your only option right now is to run arrayWeights first and pass those weights to duplicateCorrelation (and all other downstream analyses).

If it were possible to use the duplicate correlation in arrayWeights, then I'm still not sure which of the two methods should be run first, or if something more complicated would be required, such as alternately iterating both methods until convergence.

ADD COMMENTlink written 4.1 years ago by Ryan C. Thompson7.4k

Dear Ryan,

thank you both for your comment and valuable answer !! Unfortunaly, -(and thats why i posted the link to my previous post describing the specific example of my experimental design)-, i had to use duplicateCorrelation for designing a specific contrast-but as i didn't get any DE genes, that's why i thought of the possibility of combining both methodologies. Thus, i will have to stick and try what you proposed: first create design matrix and then arrayWeights, and then pass arrayWeights in the duplicateCorrelation and see the outcome.

ADD REPLYlink modified 4.1 years ago • written 4.1 years ago by svlachavas740
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 16.09
Traffic: 327 users visited in the last hour