UNAGI.perturbations.speedup_perturbation.perturbation.run_online

perturbation.run_online(allTracks, perturbated_gene, perturbated_gene_reversed, unit_name, stage=None, lastCluster=None, CUDA=False)[source]

Perform online perturbation.

Parameters:
  • allTracks (bool) – One track or all tracks

  • stage (int) – stage to be perturbed

  • lastCluster (int) – last cluster to be perturbed (if allTracks is False)

  • perturbated_gene (list) – gene to be perturbed format a:0.5, b: 2.5, c:0.5…

  • perturbated_gene_reversed (list) – gene to be perturbed format a:2.0, b: 0.4, c:2.0… (reversed log2fc to the original)

  • unit_name (str) – name of the unit to be perturbed

  • stage – stage to be perturbed, if None choose all

  • CUDA (bool) – whether to use CUDA

Returns:

  • perturbation_score (np.float) – perturbation score

  • pval (np.float) – p value