Combination of duplicateCorrelation with arrayWeights to increase power for DE detection in multilevel experiments
2
0
Entering edit mode
svlachavas ▴ 830
@svlachavas-7225
Last seen 6 months ago
Germany/Heidelberg/German Cancer Resear…

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 !!

limma duplicatecorrelation arrayweights microarray • 1.7k views
ADD COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode
@ryan-c-thompson-5618
Last seen 8 months ago
Scripps Research, La Jolla, CA

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

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