def test_convert_er_mech_to_grasp_pattern_G6PD(self): true_res_file = os.path.join(self.test_folder, 'true_res_G6PDH_mech_grasp.txt') file_in = os.path.join(self.test_folder, 'G6PDH_mech_er.txt') file_out = os.path.join(self.test_folder, 'G6PDH_mech_grasp.txt') convert_er_mech_to_grasp_pattern(file_in, file_out, promiscuous=True) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
def test_convert_er_mech_to_grasp_pattern_orderedBiBi(self): true_res_file = os.path.join(self.test_folder, 'true_res_orderedBiBi.txt') file_in = os.path.join(self.test_folder, 'orderedBiBi_mech_er.txt') file_out = os.path.join(self.test_folder, 'orderedBiBi_mech_grasp.txt') convert_er_mech_to_grasp_pattern(file_in, file_out) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
def test_convert_er_mech_to_grasp_pattern_G6PDH2CompInhib(self): true_res_file = os.path.join(self.test_folder, 'true_res_G6PDH2CompInhib.txt') file_in = os.path.join(self.test_folder, 'G6PDH2CompInhib_mech_er.txt') file_out = os.path.join(self.test_folder, 'G6PDH2CompInhib_mech_grasp.txt') inhib_list = ['m_nadph_c', 'm_nadh_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, promiscuous=True, inhib_list=inhib_list) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
def test_convert_er_mech_to_grasp_pattern_randomBiBiCompInhib(self): true_res_file = os.path.join(self.test_folder, 'true_res_randomBiBiCompInhib.txt') file_in = os.path.join(self.test_folder, 'randomBiBiCompInhib_mech_er.txt') file_out = os.path.join(self.test_folder, 'randomBiBiCompInhib_mech_grasp.txt') inhib_list = ['pyr_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, inhib_list=inhib_list) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
def test_convert_er_mech_to_grasp_pattern_orderedBiBiActivTwoTracks(self): true_res_file = os.path.join(self.test_folder, 'true_res_orderedBiBiActivTwoTracks.txt') file_in = os.path.join(self.test_folder, 'orderedBiBiActivTwoTracks_mech_er.txt') file_out = os.path.join(self.test_folder, 'orderedBiBiActivTwoTracks_mech_grasp.txt') activ_list = ['pyr_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, activ_list=activ_list) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
def test_convert_er_mech_to_grasp_pattern_AANATCompInhibIndep(self): true_res_file = os.path.join(self.test_folder, 'true_res_AANATCompInhibIndep.txt') file_in = os.path.join(self.test_folder, 'AANATCompInhibIndep_mech_er.txt') file_out = os.path.join(self.test_folder, 'AANATCompInhibIndep_mech_grasp.txt') inhib_list = ['mltn_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, promiscuous=True, inhib_list=inhib_list) with open(true_res_file, 'r') as f_in: true_res = f_in.read() with open(file_out, 'r') as f_in: res = f_in.read() self.assertEqual(true_res, res)
import os from set_up_grasp_models.set_up_models.convert_mechanisms import convert_er_mech_to_grasp_pattern # convert orderedBiBi file_in = os.path.join('mechanisms', 'orderedBiBi_mech_er.txt') file_out = os.path.join('mechanisms', 'orderedBiBi_pattern.txt') convert_er_mech_to_grasp_pattern(file_in, file_out) # convert orderedBiBi with activation file_in = os.path.join('mechanisms', 'orderedBiBiActiv_mech_er.txt') file_out = os.path.join('mechanisms', 'orderedBiBiActiv_pattern.txt') activ_list = ['pyr_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, activ_list=activ_list) # convert orderedBiBi with activation, where the reaction can proceed both # with and without the activator bound to the enzyme file_in = os.path.join('mechanisms', 'orderedBiBiActivTwoTracks_mech_er.txt') file_out = os.path.join('mechanisms', 'orderedBiBiActivTwoTracks_pattern.txt') activ_list = ['pyr_c'] convert_er_mech_to_grasp_pattern(file_in, file_out, activ_list=activ_list) # convert uniUniPromiscuous file_in = os.path.join('mechanisms', 'uniUniPromiscuous_mech_er.txt') file_out = os.path.join('mechanisms', 'uniUniPromiscuous_pattern.txt') convert_er_mech_to_grasp_pattern(file_in, file_out, promiscuous=True)