cell2home.collapse_scores
- cell2home.collapse_scores(mdata, var_to_bulk, score_key='cell_scores', collapse_key='collapsed')
Average out scores across unique combinations of categories from
.var. Will be inserted into the input MuData object under a new key.Input
- mdata
MuData Needs to have an object under
score_keyto take and use.- var_to_bulklist of
str Column names in the object’s
.varto use to compute the score averages. Each unique combination of values of the keys will be represented. Will be present as.varcolumns in the resulting object.- score_key
str, optional (default:"cell_scores") The
mdatafield to use to retrieve the scores to average out.- collapse_key
str, optional (default:"collapsed") The
mdatafield to store the averaged out scores into.
- mdata