def test_object_has_translocation(self): """p(HGNC: EGF) increases tloc(p(HGNC: VCP), GOCCID: 0005634, GOCCID: 0005737)""" g = BELGraph() u_node = protein(name='EFG', namespace='HGNC') v_node = protein(name='VCP', namespace='HGNC') u = g.add_node_from_data(u_node) v = g.add_node_from_data(v_node) g.add_qualified_edge( u_node, v_node, relation=INCREASES, citation='10855792', evidence= "Although found predominantly in the cytoplasm and, less abundantly, in the nucleus, VCP can be " "translocated from the nucleus after stimulation with epidermal growth factor.", annotations={'Species': '9606'}, object_modifier=translocation(from_loc=entity( namespace='GO', identifier='0005634'), to_loc=entity(namespace='GO', identifier='0005737'))) self.assertFalse(is_translocated(g, u)) self.assertFalse(is_degraded(g, u)) self.assertFalse(has_activity(g, u)) self.assertFalse(has_causal_in_edges(g, u)) self.assertTrue(has_causal_out_edges(g, u)) self.assertTrue(is_translocated(g, v)) self.assertFalse(is_degraded(g, v)) self.assertFalse(has_activity(g, v)) self.assertTrue(has_causal_in_edges(g, v)) self.assertFalse(has_causal_out_edges(g, v))
def test_translocation(self): self.assertEqual( self.add_edge(source_modifier=secretion()), self.add_edge(source_modifier=secretion()), ) self.assertEqual( self.add_edge(source_modifier=secretion()), self.add_edge( source_modifier=translocation(INTRACELLULAR, EXTRACELLULAR)), )
def test_translocation(self): self.assertEqual( self.add_edge(subject_modifier=secretion()), self.add_edge(subject_modifier=secretion()), ) self.assertEqual( self.add_edge(subject_modifier=secretion()), self.add_edge(subject_modifier=translocation( from_loc=intracellular, to_loc=extracellular)), )
def test_subject_translocation_custom_to_loc(self, mock): self.graph.add_increases( Protein(name='F2', namespace='HGNC'), Protein(name='EDN1', namespace='HGNC'), evidence= 'In endothelial cells, ET-1 secretion is detectable under basal conditions, whereas thrombin induces its secretion.', citation='10473669', subject_modifier=translocation( from_loc=Entity(namespace='TEST', name='A'), to_loc=Entity(namespace='GO', name='extracellular space'), )) make_dummy_namespaces(self.manager, self.graph) network = self.manager.insert_graph(self.graph) self.assertEqual(2, network.nodes.count()) self.assertEqual(1, network.edges.count()) edge = network.edges.first()
NAMESPACE: BEL_DEFAULT_NAMESPACE, NAME: 'cat' } }, OBJECT: {MODIFIER: DEGRADATION}, }), (akt1, egfr, { EVIDENCE: dummy_evidence, CITATION: citation_1, RELATION: INCREASES, SUBJECT: { MODIFIER: ACTIVITY, EFFECT: {NAME: 'kin', NAMESPACE: BEL_DEFAULT_NAMESPACE} }, OBJECT: translocation( {NAMESPACE: BEL_DEFAULT_NAMESPACE, NAME: 'intracellular'}, {NAMESPACE: BEL_DEFAULT_NAMESPACE, NAME: 'extracellular space'} ), }), (Gene('HGNC', 'AKT1', variants=Hgvs('c.308G>A')), tmprss2_erg_gene_fusion, { EVIDENCE: dummy_evidence, CITATION: citation_1, RELATION: CAUSES_NO_CHANGE, }), (Gene('HGNC', 'AKT1', variants=Hgvs('c.308G>A')), Gene('HGNC', 'AKT1', variants=[Hgvs('c.1521_1523delCTT'), Hgvs('c.308G>A'), Hgvs('p.Phe508del')]), { EVIDENCE: dummy_evidence, CITATION: citation_1, RELATION: INCREASES, SUBJECT: {LOCATION: {NAMESPACE: 'GO', NAME: 'intracellular'}}, }), (MicroRna('HGNC', 'MIR21'), bcr_jak2_gene_fusion,