tirank.TrainPre.AssignPcluster

tirank.TrainPre.AssignPcluster(df_p_values)[source]

Assigns a final phenotype (‘Rank+’, ‘Rank-’, ‘Background’) to clusters.

This assignment is based on the p-values from the permutation test.

Parameters:

df_p_values (pd.DataFrame) – DataFrame with p-values for ‘Rank+’, ‘Rank-’, and ‘Background’ enrichment for each cluster.

Returns:

A dictionary mapping the final assignment (‘Rank+’, ‘Rank-‘,

’Background’) to a list of cluster IDs.

Return type:

dict