how to use `arrayWeightsQuick()`?
1
0
Entering edit mode
matthew • 0
@5bc3c081
Last seen 1 day ago
United States

I am using limma for a large analysis (>5,000 samples, >300 covariates) of single-channel microarray data without probe quality weights. I find that arrayWeights() is unusably slow in this large-sample, large-coefficient setting (arrayWeights() has been running for > 24 hours and is still going).

Therefore, I am interested in using arrayWeightsQuick() as an alternative to arrayWeights(). However, arrayWeightsQuick() cannot be a drop-in replacement for arrayWeights() because the function signature of arrayWeightsQuick() requires the output of lmFit(). I believe this means that arrayWeightsQuick() is used at a different stage of the workflow relative to arrayWeights().

Here is my current workflow using arrayWeights():

weights <- arrayWeights(expression, design=design)  # unusably slow!
fit <- lmFit(expression, design=design, weights=weights)

Is the following 2-step procedure a proper way to substitute arrayWeightsQuick() for arrayWeights()?

prefit <- lmFit(expression, design=design) # temporary
weights <- arrayWeightsQuick(expression, prefit)
fit <- lmFit(expression, design=design, weights=weights)

Relatedly: the user guide for limma mentions arrayWeightsSimple(), but no such function exists. Perhaps arrayWeightsSimple() was renamed to arrayWeightsQuick() in the code, but the documentation is not yet updated accordingly?

limma • 563 views
ADD COMMENT
0
Entering edit mode

What sort of object is expression? Does it contain any missing values?

ADD REPLY
0
Entering edit mode

In the specific use-case I have in mind, expression is a simple matrix of log2 gene expression per sample, no missing values.

ADD REPLY
2
Entering edit mode
@gordon-smyth
Last seen 16 hours ago
WEHI, Melbourne, Australia

Yes, that is the correct way to use arrayWeightsQuick.

Thanks for pointing out that there is still a reference to arrayWeightsSimple in the User's Guide. That function was merged into arrayWeights in 2019 and was removed as redundant, as part of a major rewrite of arrayWeights. arrayWeightsSimple was always different from arrayWeightsQuick. If you are running arrayWeights now on a matrix with no missing values or prior weights, then it will run effectively the same algorithm that was previously in arrayWeightsSimple.

On my laptop, it takes just over an hour for arrayWeights() to run on a dataset with 10,000 probes, 5000 samples and a design matrix with 300 columns. Meanwhile, arrayWeightsQuick takes only a few seconds.

ADD COMMENT

Login before adding your answer.

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