scdemon.plotting.plot_df_enrichment

scdemon.plotting.plot_df_enrichment(obj, graph_id, df, col, suffix, imgdir='./', attr='leiden', title=None, ext='png')

Calculate and plot enrichment of sets of genes (e.g. DEGs) against modules

Parameters:
  • obj (gene_graph | modules) – Object (gene_graph or modules) with modules to plot

  • graph_id (str) – Name of graph to work with

  • df (pandas.DataFrame) – Dataframe containing gene sets, with gene column named 'gene'

  • col (str) – Column name in df that gives the gene sets

  • suffix (str) – Suffix for the plot filename

  • attr (str) – Name of modules in the graph

  • title (str) – Title for plot

  • imgdir (str) – Directory for images

  • ext (str) – Extension for file (either 'pdf' or 'png')