nmf_models.utils.get_top_features

get_top_features(nmf_model, topics=None, n_features=1, modality='rna', mode='abs')[source]

Get the highest ranked features from selected topics.

Parameters:
  • nmf_model (intNMF) – intNMF model with loadings to plot (.fit has been run)

  • topics (list[int], default None (all topics)) – list of topics to get top features for

  • n_features (int, default 1) – Number of features

  • modality (str, 'rna' | 'atac', default 'rna') – modality fro which to return features

  • mode (str, 'abs' | 'diff', default 'abs') – select features based on absolute value or diff with other topics average

Return type:

list[str] of features from selected modality