Commit 31ccc1b8 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[library] Change of notation: cam -> mac

parent b2ed1573
......@@ -198,7 +198,7 @@ The gui package exposes the command `cadbiom` to the current context.
$ cadbiom_cmd -h
usage: cadbiom_cmd [-h] [-vv [VERBOSE]]
{compute_macs,sort_solutions,parse_trajectories,merge_cams}
{compute_macs,sort_solutions,parse_trajectories,merge_macs}
...
optional arguments:
......@@ -206,7 +206,7 @@ The gui package exposes the command `cadbiom` to the current context.
-vv [VERBOSE], --verbose [VERBOSE]
subcommands:
{compute_macs,sort_solutions,parse_trajectories,merge_cams}
{compute_macs,sort_solutions,parse_trajectories,merge_macs}
compute_macs Parse arguments and launch Cadbiom search of MACs
(Minimal Activation Conditions). - If there is no
input file, there will be only one process. - If an
......@@ -223,8 +223,8 @@ The gui package exposes the command `cadbiom` to the current context.
The output is in graphml file format and is exported
in 'graphs' directory. .. note:: Requires the
model file.
merge_cams Merge solutions to a csv file. .. note:: CSV file:
<Final property formula>;<cam>
merge_macs Merge solutions to a csv file. .. note:: CSV file:
<Final property formula>;<mac>
model_comp Model consistency checking. Check if the 2 given
models have the same topology, nodes & edges
attributes/roles. .. note:: You can export a graphml
......@@ -285,9 +285,9 @@ The gui package exposes the command `cadbiom` to the current context.
sol_file
### merge_cams:
### merge_macs:
usage: cadbiom_cmd merge_cams [-h] [--output [OUTPUT]] [solutions_directory]
usage: cadbiom_cmd merge_macs [-h] [--output [OUTPUT]] [solutions_directory]
positional arguments:
solutions_directory
......
......@@ -406,9 +406,9 @@ class TestMCLAnaLyzer(unittest.TestCase):
def test_cam_no_clock(self):
def test_mac_no_clock(self):
"""
test cam without clocks
test mac without clocks
"""
# solving
rep = ErrorRep()
......@@ -419,9 +419,9 @@ class TestMCLAnaLyzer(unittest.TestCase):
mcla.build_from_cadlang(f_name)
mcla.unfolder.set_stats()
query = MCLSimpleQuery(None, None, prop)
cam_list = mcla.mac_search(query, 10)
res = len(cam_list) == 8
self.assert_(res, 'Incorrect number of cam')
mac_list = mcla.mac_search(query, 10)
res = len(mac_list) == 8
self.assert_(res, 'Incorrect number of mac')
list_expected = [['SP1', 'betaglycan__dimer___intToMb', 'SMAD4_nucl', 'importinbeta', 'MIZ_1', 'DAB2', 'TGFBfamily__dimer___active_exCellRegion', 'TGFBR2__dimer___active_intToMb', 'Axin_SMAD3', 'SMAD4_cy', 'SMAD2_3', 'FKBP12_TGFBR1__dimer___inactive_intToMb', 'CTGF'],
['SP1', 'betaglycan__dimer___intToMb', 'SMAD4_nucl', 'MIZ_1', 'DAB2', 'TGFBfamily__dimer___active_exCellRegion', 'TGFBR2__dimer___active_intToMb', 'Axin_SMAD3', 'SMAD4_cy', 'importinalpha', 'SMAD2_3', 'FKBP12_TGFBR1__dimer___inactive_intToMb', 'CTGF'],
['SP1', 'betaglycan__dimer___intToMb', 'SMAD4_nucl', 'MIZ_1', 'DAB2', 'TGFBfamily__dimer___active_exCellRegion', 'NUP214', 'TGFBR2__dimer___active_intToMb', 'Axin_SMAD3', 'SMAD4_cy', 'SMAD2_3', 'FKBP12_TGFBR1__dimer___inactive_intToMb', 'CTGF'],
......@@ -432,15 +432,15 @@ class TestMCLAnaLyzer(unittest.TestCase):
['SP1', 'betaglycan__dimer___intToMb', 'SMAD4_nucl', 'FOXO1_3a_4_active_nucl', 'DAB2', 'CEBPB', 'TGFBfamily__dimer___active_exCellRegion', 'TGFBR2__dimer___active_intToMb', 'Axin_SMAD3', 'SMAD4_cy', 'SMAD2_3', 'NUP153', 'FKBP12_TGFBR1__dimer___inactive_intToMb', 'CTGF', 'FOXG1']
]
list_obtained = []
for cam in cam_list:
list_obtained.append(cam.activated_frontier)
for mac in mac_list:
list_obtained.append(mac.activated_frontier)
res = lit_sol_equal(list_expected, list_obtained)
self.assert_(res, 'Incorrect list of MAC (no clock)')
def test_cam_clock(self):
def test_mac_clock(self):
"""
cam with clocks
mac with clocks
"""
# solving
rep = ErrorRep()
......@@ -452,15 +452,15 @@ class TestMCLAnaLyzer(unittest.TestCase):
#mcla.build_from_cadlang("examples/delay2.cal")
#mcla.unfolder.set_stats()
query = MCLSimpleQuery(None, None, prop)
cam_list = mcla.mac_search(query, 10)
mac_list = mcla.mac_search(query, 10)
list_expected = [['SMAD4_nucl', 'FOXO1_3a_4_active_nucl', 'CEBPB', 'TGFB_TGFBR2_TGFBR1_DAB2_active_intToMb', 'SMAD2_3', 'FOXG1'],
['SP1', 'SMAD4_nucl', 'MIZ_1', 'TGFB_TGFBR2_TGFBR1_DAB2_active_intToMb', 'SMAD2_3'],
['SP1', 'betaglycan__dimer___intToMb', 'SMAD4_nucl', 'Caveolin_1', 'MIZ_1', 'TRAP_1_TGFBR1__dimer___inactive_intToMb', 'AP2B2', 'TGFBR2__dimer___active_intToMb', 'PML_SARA_SMAD2_3_earlyendosome', 'TGFBfamily__dimer___active_exCellRegion', 'SMAD7_SMURF1_2_nucl', 'CTGF'],
['betaglycan__dimer___intToMb', 'SMAD4_nucl', 'Caveolin_1', 'FOXO1_3a_4_active_nucl', 'TRAP_1_TGFBR1__dimer___inactive_intToMb', 'AP2B2', 'CEBPB', 'TGFBR2__dimer___active_intToMb', 'PML_SARA_SMAD2_3_earlyendosome', 'TGFBfamily__dimer___active_exCellRegion', 'SMAD7_SMURF1_2_nucl', 'CTGF', 'FOXG1']
]
list_obtained = []
for cam in cam_list:
list_obtained.append(cam.activated_frontier)
for mac in mac_list:
list_obtained.append(mac.activated_frontier)
res = lit_sol_equal(list_expected, list_obtained)
self.assert_(res, 'Incorrect list of MAC (clock)')
......@@ -542,7 +542,7 @@ class TestMCLAnaLyzer(unittest.TestCase):
self.assert_(res, "Property not reached")
def test_cam_delay_save(self):
def test_mac_delay_save(self):
"""
Test save on the delay example
"""
......@@ -568,7 +568,7 @@ class TestMCLAnaLyzer(unittest.TestCase):
os.remove("x_file")
def test_cam_inhibitor(self):
def test_mac_inhibitor(self):
"""
test
"""
......@@ -581,12 +581,12 @@ class TestMCLAnaLyzer(unittest.TestCase):
macwic = mcla.mac_search(query, 10)
exp_act_front = ['A1', 'C1', 'B1']
res = lit_subsol_equal(exp_act_front, macwic[0].activated_frontier)
self.assert_(res, "Bad cam frontier solution")
self.assert_(res, "Bad mac frontier solution")
exp_timing = ["%", "% h2", "%", "%"]
obt_timing = []
obt_timing.extend(macwic[0].ic_sequence)
res = lit_subsol_equal(exp_timing, obt_timing)
self.assert_(res, "Bad cam timing solution")
self.assert_(res, "Bad mac timing solution")
res = mcla.is_strong_activator(macwic[0], query)
# it is not a strong activator
self.assert_(not res, "Not a strong activator")
......
......@@ -491,10 +491,10 @@ class TestStaticAnalysis(unittest.TestCase):
sta.build_from_chart_file(file_name)
# graph = sta.make_dependence_dg()
graph = sta.make_transition_dg()
cam = ['ADAM10','HIF1A_cy','GammaSecretase_plasmaMb','ARNT_nucl','Jagged1_intToMb','SMAD2_3','SP1','IPAS','NOTCH1_golgiAp','MIZ_1','SHARP_RBPJ_CtIP_CtBP_LSD1_nucl','TGFB_TGFBR2_TGFBR1_DAB2_active_intToMb','SMAD4_nucl']
mac = ['ADAM10','HIF1A_cy','GammaSecretase_plasmaMb','ARNT_nucl','Jagged1_intToMb','SMAD2_3','SP1','IPAS','NOTCH1_golgiAp','MIZ_1','SHARP_RBPJ_CtIP_CtBP_LSD1_nucl','TGFB_TGFBR2_TGFBR1_DAB2_active_intToMb','SMAD4_nucl']
prop = ['p15INK4b','p21CIP1']
# sta.get_frontier_successors(graph, cam, prop, True)
sta.get_propagated_places(cam, prop)
# sta.get_frontier_successors(graph, mac, prop, True)
sta.get_propagated_places(mac, prop)
if __name__ == '__main__':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment