()
| 78 | return selected_genes |
| 79 | |
| 80 | def ALL(): |
| 81 | # use before batch corrected CCLE most vairance genes |
| 82 | # index is drug, so we need clean up the df |
| 83 | temp = pd.read_csv(os.path.join(ROOT_DIR, 'data', 'cell_line_data','CCLE','CCLE_exp.csv'),sep=',') |
| 84 | temp.columns = ['Entrez gene id']+[split_it_cell(_) for _ in list(temp.columns)[1:]] |
| 85 | df_transpose = temp.T |
| 86 | df_transpose.columns = df_transpose.iloc[0] |
| 87 | processed_data = df_transpose.drop(df_transpose.index[0]) |
| 88 | |
| 89 | var_df = processed_data.var(axis=1) |
| 90 | selected_genes = list(var_df.sort_values(ascending=False).iloc[:1000].index) |
| 91 | with open(os.path.join(ROOT_DIR, 'data', 'drug_data','input_drug_data.npy'), 'rb') as file: |
| 92 | data_dicts = np.load(file, allow_pickle=True).item() |
| 93 | |
| 94 | drug_target = list(data_dicts['drug_target'].index) |
| 95 | |
| 96 | return list(set(selected_genes+drug_target)) |
| 97 | |
| 98 | # select genes based on criterion (variance or STRING) |
| 99 | function_mapping = {'variance':'filter_by_variance', 'STRING':'filter_by_706_genes', 'dti':'filter_by_2000_genes',\ |
nothing calls this directly
no test coverage detected