UNAGI.perturbations.speedup_perturbation.perturbation.run

perturbation.run(mode, log2fc, inplace=False, random_times=100, random_genes=2, CUDA=False, device='cuda:0')[source]

Perform perturbation.

Parameters:
  • mode (str) – perturbation mode, ‘drug’, ‘pathway’, ‘random_background’, ‘online_random_background’, ‘perfect’

  • log2fc (float) – log2fc of the perturbation

  • inplace (bool) – whether to write the perturbation results to the adata object

  • random_times (int) – number of random genes to be perturbed

  • random_genes (int) – number of random genes to be perturbed

  • CUDA (bool) – whether to use CUDA

Returns:

None