Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categorise methods and refactor code base #46

Open
PeteHaitch opened this issue Apr 5, 2018 · 1 comment
Open

Categorise methods and refactor code base #46

PeteHaitch opened this issue Apr 5, 2018 · 1 comment

Comments

@PeteHaitch
Copy link
Owner

PeteHaitch commented Apr 5, 2018

Should be possible to categorise methods based on a few criteria:

  • Row-block processing vs. column-block processing vs. requires full matrix in-memory (at least under a naïve implementation)
  • Endomorphic (returns matrix of same size as input) vs. returns a vector
  • Other?

Can then greatly simplify codebase by writing code that handles each case and code that registers methods for each function in that category.

Furthermore, should now use DelayedArray::blockApply()/minfi:::blockApplyWithRealization()/minfi:::blockMapply()/minfi:::blockMapplyWithRealization() (moving the minfi functions over to DelayedMatrixStats, if not DelayedArray), along with minfi:::colBlock() and minfi:::rowBlock().

@PeteHaitch PeteHaitch changed the title Categories methods and refactor code base Categorise methods and refactor code base Apr 5, 2018
@PeteHaitch
Copy link
Owner Author

PeteHaitch commented Apr 6, 2018

NOTE: Those in bold are implemented in DelayedArray.
NOTE: Consider registering a DelayedUnaryIsoOp or DelayedNaryIsoOp for 'matrix in, matrix out (endomorphic)' ops

Matrix in, vector out

  • colAlls(), colAnyMissings(), colAnyNAs(), colAnys(), colCollapse(), colCounts(), colIQRDiffs(), colIQRs(), colLogSumExps(), colMadDiffs(), colMads(), colMaxs(), colMeans2(), colMedians(), colMins(), colOrderStats(), colProds(), colSdDiffs(), colSds(), colSums2(), colVarDiffs(), colVars(), colWeightedMads(), colWeightedMeans(), colWeightedMedians(), colWeightedSds(), colWeightedVars()

Matrix in, matrix out (not endomorphic)

  • colAvgsPerRowSet(), colDiffs(), colQuantiles(), colRanges(), colRanks() (depending on value of preserveShape), colTabulates(),

Matrix in, matrix out (endomorphic)

  • colCummaxs(), colCummins(), colCumprods(), colCumsums()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant