Closed Unaimend closed 3 months ago
As a test case merge one of karlis models against itself. I still got one to many matches
import time
# Record the start time
start_time = time.time()
# test the comparison for metabolite matching
mod_path = dat.joinpath("MYb11_iCEL1314/M1_MYb11.xml")
mod_path2 = dat.joinpath("MYb11_iCEL1314/M2_iCEL1314.xml")
mod = MeMoModel.fromPath(mod_path)
mod2 = MeMoModel.fromPath(mod_path2)
print(len(mod.cobra_model.metabolites))
print(len(mod2.cobra_model.metabolites))
# self comparison
res = mod.match(mod)
res.to_csv("stuff.csv")
end_time = time.time()
# Calculate the elapsed time
elapsed_time = end_time - start_time
print("Elapsed time:", elapsed_time, "seconds")
if __name__ == '__main__':
test_MeMoModelCompare2()
There are still one to many matches
Currently one metabolite from the
left
model can have multiple matches from the right model. Add a column that is called "one to many" or sth like that that signifies that this match was one to many