{"SOCS1": 1, "STAT1": 1, "IFNg": 2, "Tbet": 2, "IFNgR": 1, "GATA3": 1},
        {"SOCS1": 1, "STAT1": 1, "IFNg": 1, "Tbet": 1, "IFNgR": 1, "GATA3": 1},
    ],
)


mutationsPhenotypes = [wt, il_12_p, ifng_0, ifngr_0, il_18_p, il_12_18_p, gata3_p]
# mutationsPhenotypes=[wt]
# relationShip_to_test=[("STAT6","IL12R"),("Tbet","GATA3")]
relationShip_to_test = nxG.edges()
for r in relationShip_to_test:
    nxGtemp, focalTemp = remove_relation(*r)
    valid = True

    for m in mutationsPhenotypes:
        tables = ft.compute_sstate(focalTemp, m[0])
        ssStates = map(ft.state_to_dict, tables[0])

        for ssState in ssStates:
            valid &= ssState in m[1]

        for ssState in m[1]:
            valid &= ssState in ssStates
        if not valid:
            break

    if valid:
        print "relation", r, "not needed"
    else:
        print "relation", r, "needed"
(1, 0, 2, 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1),
(1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1)
])

il_12_18_p=({"IL12":[1,1],"IL18":[1,1]},[
(1, 0, 2, 1, 0, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 0, 1),
(1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 0, 1),
(0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0)
])
gata3_p=({"GATA3":[1,1]},[
(0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0),
(0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0),
(0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)
])


mutationsPhenotypes=[wt,il_12_p,ifng_0,ifngr_0,il_18_p,il_12_18_p,gata3_p]

for m in mutationsPhenotypes:
	tables=ft.compute_sstate(reducedFocalParamsValues,m[0])
	print m[0],
	valid=True
	for ssState in tables[0]:
		valid = valid & (ssState[1:] in m[1])
	if not valid:
		print "diff on"
		ft.print_st_states(tables[0])
		print "not equiv to"
		ft.print_st_states(m[1])
	print valid,
	print "-"*8