diffxpy.api.enrich.test

diffxpy.api.enrich.test(ref: diffxpy.enrichment.enrich.RefSets, det: Optional[diffxpy.testing.det._DifferentialExpressionTest] = None, scores: Optional[numpy.array] = None, gene_ids: Optional[list] = None, threshold=0.05, incl_all_zero=False, all_ids=None, clean_ref=False, capital=True)

Perform gene set enrichment.

Wrapper for Enrich. Just wrote this so that Enrich shows up with a nice doc string and that the call to this is de.enrich.test which makes more sense to me than de.enrich.Enrich.

Parameters
  • ref – The annotated gene sets against which enrichment is tested.

  • det – The differential expression results object which is tested for enrichment in the gene sets.

  • scores – Alternative to DETest, vector of scores (scalar per gene) which are then used to discretize gene list. This can for example be corrected p-values from a differential expression test, in that case the parameter threshold would be a significance threshold.

  • gene_ids – If pval was supplied instead of DETest, use gene_ids to supply the vector of gene identifiers (strings) that correspond to the p-values which can be matched against the identifiers in the sets in RefSets.

  • threshold – Threshold of parameter scores at which a gene is included as a hit: In the case of differential test p-values in scores, threshold is the significance threshold.

  • incl_all_zero – Wehther to include genes in gene universe which were all zero.

  • all_ids – Set of all gene identifiers, this is used as the background set in the hypergeometric test. Only supply this if not all genes were tested and are supplied above in DETest or gene_ids.

  • clean_ref – Whether or not to only retain gene identifiers in RefSets that occur in the background set of identifiers supplied here through all_ids.

  • capital – Make all gene IDs captial.