mantispy.tl.rank_sets#
- mantispy.tl.rank_sets(adata, groupby, score_key='score_ulm', key_added='rank_sets', copy=False)[source]#
Rank feature sets by how far each group’s score sits from the rest.
- Parameters:
- adata
AnnData Object already scored by
enrich().- groupby
str obscolumn defining the groups.- score_key
str(default:'score_ulm') The
obsmkey written byenrich().- key_added
str(default:'rank_sets') Name for the output table.
- copy
bool(default:False) Return a modified copy instead of mutating in place.
- adata
- Return type:
- Returns:
None, or the modified copy. Writesuns["mantispy"][key_added]withgroup,setandscore, the group’s mean enrichment score minus the mean over all other rows.- Raises:
KeyError –
obsmhas noscore_key.ValueError –
groupbyhas a single group, leaving nothing to rank it against.