3 Paz@s"dZddlZddlZdddZdS)zX Defines utility functions for odor-related matters, like loading from the DoOR dataset N.cCstjj|d}tjtjj|ddd}tjtjj|ddd}tjtjj|ddd}d|j_|d }|j|jd }d |j_||||fS) ax Loads DoOR data from the tables generated by ./datasets/DoOR/get_door_data.R Returns pandas dataframes: df_door_mappings: index is receptor name, columns include DoOR code, ORN, glomerulus, etc. df_door_odor: index is InChiKey (chemical key) of an odor, columns include name, physical properties df_door_response_matrix: index is odorant InChIkey, columns are receptor responses df_odor_response_matrix: index is odorant common name, columns are receptor responses z datasets/DoORzDoOR_mappings.csvr) index_colz DoOR_odor.csvzDoOR_SFR_response_matrix.csvZInChIKeyNameZodor)ospathjoinpdread_csvindexname set_index)home_dirZ datasets_dirdf_door_mappings df_door_odordf_door_response_matrixZdoor_key_to_odor_namedf_odor_response_matrixr..\utils\odor_utils.pyload_door_datasr)r)__doc__pandasr rrrrrrs