pylimma.aver_arrays
- pylimma.aver_arrays(x, id=None, weights=None)[source]
Average over technical-replicate columns.
Faithful port of R limma’s
avearrays.default(matrix) andavearrays.EList(limma/R/avearrays.R:6-64). The unweighted path mirrorsrowsum(..., reorder=FALSE): groups are ordered by first appearance (unique(id)), not sorted. The weighted path fitslm_fit(x, design=one_hot(id), weights=weights)and returns the coefficients.avearrays.MAListis out of scope (two-colour data only).For
AnnDatainput,iddefaults toadata.obs_namesand a newAnnDatais returned (obs axis collapsed to the unique ids). Because the output has a different number of samples than the input, in-place mutation via a layer is not possible, so this is the one AnnData-in path in pylimma that returns a value rather thanNone.- Parameters:
weights (ndarray | None)