Run downstream tasks to analyze the UNAGI outcomes

UNAGI provides all an all-in-one solution to perform downstream to analyse its outcomes. The function UNAGI.analyse_UNAGI can identify the dynamic markers and hierarchical static markers, perform pathway and compound perturbations. This function takes the h5ad file generated by UNAGI and the iteration of the generated file as the inputs. Users are also required to specify the number of sampling times to build the random distribution background of dynamic markers. Users can use the precomputed CMAP dataset (download from Example data) to perform the drug perturbation. If users have a specific interest of compoound sets to user, they can customize a compound file.

from UNAGI import UNAGI
unagi = UNAGI()

generated_data = 'UNAGI_generated_data' # data generated by UNAGI
data_iteration = NUM_ITERATION # iteration of UNAGI
sampling_times = SAMPLING_TIMES # sampling times of UNAGI
save_dir = 'DIRECTORY_TO_SAVE_ANALYZED_DATA' # directory to save result
cmap_dir = 'PRECOMPUTED_CMAP_DATA' # directory to precomputed cmap data
customized_drug = 'CUSTOMIZED_DRUG_TARGET_PAIR' # customized drug target pair if needed

unagi.analyse_UNAGI(generated_data,data_iteration,sampling_times,target_dir=save_dir,customized_drug=customized_drug,cmap_dir=cmap_dir)