|
5 | 5 | import warnings |
6 | 6 | import argparse |
7 | 7 | import json |
8 | | - |
| 8 | +from scripts.calculate_bimodality_coefficient import ( |
| 9 | + bimodality_coefficient_for_cpd_viabilities, |
| 10 | +) |
9 | 11 | from taigapy import create_taiga_client_v3 |
10 | 12 |
|
11 | 13 | MIN_GROUP_SIZE = 5 |
@@ -48,8 +50,8 @@ def load_crispr_data( |
48 | 50 | return gene_effect, gene_dependency |
49 | 51 |
|
50 | 52 |
|
51 | | -def load_prism_data(tc, repurposing_matrix_taiga_id, repurposing_list_taiga_id): |
52 | | - Extended_Primary_Compound_List = tc.get(repurposing_list_taiga_id) |
| 53 | +def load_prism_data(tc, repurposing_matrix_taiga_id, portal_compounds_taiga_id): |
| 54 | + Portal_Compounds = tc.get(portal_compounds_taiga_id) |
53 | 55 | Extended_Primary_Data_Matrix = tc.get(repurposing_matrix_taiga_id).T |
54 | 56 | Data_Matrix_Discrete = Extended_Primary_Data_Matrix < np.log2(0.3) |
55 | 57 | Data_Matrix_Discrete = Data_Matrix_Discrete.mask( |
@@ -146,11 +148,9 @@ def load_all_data( |
146 | 148 | gene_effect_taiga_id, |
147 | 149 | gene_dependency_taiga_id, |
148 | 150 | repurposing_matrix_taiga_id, |
149 | | - repurposing_list_taiga_id, |
150 | 151 | oncref_auc_taiga_id, |
151 | | - repurposing_table_path, |
152 | | - oncref_table_path, |
153 | 152 | tda_table_path, |
| 153 | + portal_compounds_taiga_id, |
154 | 154 | ): |
155 | 155 |
|
156 | 156 | all_data_dict = dict() |
@@ -182,7 +182,7 @@ def load_all_data( |
182 | 182 | rep_sensitivity = load_prism_data( |
183 | 183 | tc=tc, |
184 | 184 | repurposing_matrix_taiga_id=repurposing_matrix_taiga_id, |
185 | | - repurposing_list_taiga_id=repurposing_list_taiga_id, |
| 185 | + portal_compounds_taiga_id=portal_compounds_taiga_id, |
186 | 186 | ) |
187 | 187 | datasets_to_test["PRISMRepurposing"] = rep_sensitivity |
188 | 188 |
|
@@ -469,35 +469,28 @@ def compute_context_explorer_results(inputs, out_filename): |
469 | 469 | repurposing_matrix_taiga_id = get_id_or_file_name( |
470 | 470 | taiga_ids_or_file_name["repurposing_matrix_taiga_id"] |
471 | 471 | ) |
472 | | - repurposing_list_taiga_id = get_id_or_file_name( |
473 | | - taiga_ids_or_file_name["repurposing_list_taiga_id"] |
474 | | - ) |
475 | 472 | oncref_auc_taiga_id = get_id_or_file_name( |
476 | 473 | taiga_ids_or_file_name["oncref_auc_taiga_id"] |
477 | 474 | ) |
478 | 475 |
|
479 | | - repurposing_table_path = get_id_or_file_name( |
480 | | - taiga_ids_or_file_name["repurposing_table_path"], id_key="filename" |
481 | | - ) |
482 | | - oncref_table_path = get_id_or_file_name( |
483 | | - taiga_ids_or_file_name["oncref_table_path"], id_key="filename" |
484 | | - ) |
485 | 476 | tda_table_path = get_id_or_file_name( |
486 | 477 | taiga_ids_or_file_name["tda_table"], id_key="filename" |
487 | 478 | ) |
488 | 479 |
|
| 480 | + portal_compounds_taiga_id = get_id_or_file_name( |
| 481 | + taiga_ids_or_file_name["portal_compounds_taiga_id"] |
| 482 | + ) |
| 483 | + |
489 | 484 | ### ---- LOAD DATA ---- ### |
490 | 485 | data_dict = load_all_data( |
491 | | - subtype_tree_taiga_id, |
492 | | - context_matrix_taiga_id, |
493 | | - gene_effect_taiga_id, |
494 | | - gene_dependency_taiga_id, |
495 | | - repurposing_matrix_taiga_id, |
496 | | - repurposing_list_taiga_id, |
497 | | - oncref_auc_taiga_id, |
498 | | - repurposing_table_path, |
499 | | - oncref_table_path, |
500 | | - tda_table_path, |
| 486 | + subtype_tree_taiga_id=subtype_tree_taiga_id, |
| 487 | + context_matrix_taiga_id=context_matrix_taiga_id, |
| 488 | + gene_effect_taiga_id=gene_effect_taiga_id, |
| 489 | + gene_dependency_taiga_id=gene_dependency_taiga_id, |
| 490 | + repurposing_matrix_taiga_id=repurposing_matrix_taiga_id, |
| 491 | + oncref_auc_taiga_id=oncref_auc_taiga_id, |
| 492 | + tda_table_path=tda_table_path, |
| 493 | + portal_compounds_taiga_id=portal_compounds_taiga_id, |
501 | 494 | ) |
502 | 495 |
|
503 | 496 | context_explorer_results = compute_in_out_groups(**data_dict) |
|
0 commit comments