pegasus.write_gsea_results_to_excel

pegasus.write_gsea_results_to_excel(data, output_file, gsea_key='gsea_out', ndigits=3)[source]

Write Gene Set Enrichment Analysis (GSEA) results into Excel workbook.

Parameters
  • data (MultomodalData or UnimodalData) – Single-cell or pseudo-bulk data.

  • output_file (str) – File name for the output.

  • gsea_key (str, optinoal, default: gsea_out) – Key name of GSEA results stored in data.uns field.

  • ndigits (int, optional, default: 3) – Round non p-values and q-values to ndigits after decimal point in the excel.

Return type

None

Returns

  • None

  • Pathway information is written to file with name output_file.

  • In the generated Excel workbook, there are two tabs

    • UP: Pathways with positive NES scores (NES column), which are sorted by q-values (padj column).

    • DOWN: Pathways with negative NES scores (NES column), which are sorted by q-values (padj column).

Examples

>>> pg.write_gsea_results_to_excel(data, "gsea.xlsx")