1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| adjacencies = grnboost2(ex_matrix, tf_names=tf_names, verbose=True) with open('adjacencies.pydata','wb') as f: pickle.dump(adjacencies,f) modules = list(modules_from_adjacencies(adjacencies, ex_matrix)) with open('modules.pydata','wb') as f: pickle.dump(modules,f) with ProgressBar(): df = prune2df(dbs, modules, MOTIF_ANNOTATIONS_FNAME) with open('df.pydata','wb') as f: pickle.dump(df,f) from gc import collect as gc gc() regulons = df2regulons(df) with open('regulons.pydata','wb') as f: pickle.dump(regulons,f) auc_mtx = aucell(ex_matrix, regulons, num_workers=4) sns.clustermap(auc_mtx, figsize=(8,8))
|