hansenlab / minfi

Devel repository for minfi
58 stars 70 forks source link

Add DelayedArray support for compartments() and createCorMatrix() #161

Closed PeteHaitch closed 6 years ago

PeteHaitch commented 6 years ago

Support is not-fully optimised but should be reasonable since only a small-ish subset of loci are used.

In createCorMatrix(), the subsetted M matrix, with dimensions = nloci * nsamples, is realized in-memory. This is relatively small since it is restricted to a single chromosome, typically only includes Open Sea probes, and has SNPs removed.

A complete implementation will require cor(), .returnBinnedMatrix(), .getFirstPC(), .fsvd(), .meanSmoother(), and .unitarize() to support DelayedArray instances.

PeteHaitch commented 6 years ago

Relatedly, createCorMatrix() and extractAB() are both exported and is have an \alias{} in compartments.Rd. However, neither is actually described in the documentation and presumably the user should always be calling compartments() rather than these lower-level functions. So should these be made internal functions or has the ship sailed on that front?

PeteHaitch commented 6 years ago

Closing stale pull request. Will revisit this issue.