Skip to content
Snippets Groups Projects
Commit 4ecfb283 authored by UMEC Mathieu's avatar UMEC Mathieu
Browse files

debug Mapping_using_the_API

parent 8ae7e590
No related branches found
No related tags found
No related merge requests found
......@@ -436,7 +436,7 @@ def m_ora_cpdb(accnumbers, acctype, cpdbidsbg=None,
if len(l_map) == len(accnumbers):
break
for id_m in l_map:
id_t = id_m.replace("k", "kegg").replace("']", "")
id_t = id_m.replace("k", "kegg").replace("c","chebi").replace("']", "")
id_cln = tab_cor[1].index(id_t)
l_map_cor.append(tab_cor[0][id_cln])
return l_map_cor
......@@ -501,6 +501,8 @@ def m_ora_cpdb(accnumbers, acctype, cpdbidsbg=None,
for o_s_i, o_s in enumerate(ov_splited):
if o_s_i == 0:
o_s_i_temp = o_s.replace("C", "kegg:C").replace("']", "")
if "C" not in o_s_i_temp:
o_s_i_temp = "chebi:" + o_s_i_temp
i_u = tab_cor[0][tab_cor[1].index(o_s_i_temp)]
clean_id.append(i_u)
else:
......@@ -646,11 +648,11 @@ def opti_multimapping(file, outfolder, mapping="YES"):
l_opt_ramp_tri[0] = "RAMP"
recap.append(l_opt_ramp_tri)
recap = pd.DataFrame(data=recap).transpose()
n_out_f = outfolder+"recap_mapping_opti.xlsx"
n_out_f = outfolder+"recap_mapping_opti_oeil.xlsx"
excel_file_writer(recap, n_out_f, sheetname="Resultats")
return "all is ok"
if __name__ == "__main__":
F_ENTER = FOLDER+"fichier_entree_test_multi_mapping.xlsx"
F_ENTER = FOLDER+"Donnees_oeil_mis_en_forme_opti_mapping.xlsx"
opti_multimapping(F_ENTER, FOLDER)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment