Skip to main content

Module dups

Module dups 

Source
Expand description

duplicateCorrelation (dups.R) and its helpers. Estimates the intra-block (or intra-duplicate) correlation of a series of arrays via REML, reproducing limma’s call into statmod’s mixedModel2Fit(only.varcomp=TRUE) and glmgam.fit. Only the weights = NULL path is implemented; weighted correlation estimation is out of scope for this pure-Rust port.

Structs§

DupCorOutput
Result of duplicate_correlation.

Functions§

avedups
avedups.default (numeric matrix path): average over the ndups duplicate spots spacing apart, optionally weighted, giving a (spacing*ngroups) x nslides matrix. NaN values are skipped (R’s na.rm = TRUE); a weight that is NaN, negative, or paired with a NaN value is treated as zero, so a group with no usable weight yields NaN.
duplicate_correlation
duplicateCorrelation(object, design, ndups, spacing, block, trim) for the unweighted matrix path. Provide either block (intra-block correlation, ndups/spacing ignored) or ndups >= 2 (intra-duplicate correlation).
uniquegenelist
uniquegenelist: keep one entry per gene by selecting the first of each group of ndups duplicate spots spacing apart (the first column of unwrapdups). Generic over the element type so it serves character gene lists as well as numeric ones.
unwrapdups
unwrapdups: reshape a nspots x nslides matrix so that the ndups spots spacing apart for one gene share a row, giving nspots/ndups/spacing rows and ndups*nslides columns.