Example #1
0
    def test_subject_has_secretion(self):
        """sec(p(MGI:S100b)) increases a(CHEBI:"nitric oxide")"""
        g = BELGraph()
        u_node = protein(name='S100b', namespace='MGI')
        v_node = abundance(name='nitric oxide', namespace='CHEBI')
        u = g.add_node_from_data(u_node)
        v = g.add_node_from_data(v_node)

        g.add_increases(
            u_node,
            v_node,
            citation='11180510',
            evidence=
            'S100B protein is also secreted by astrocytes and acts on these cells to stimulate nitric oxide '
            'secretion in an autocrine manner.',
            annotations={
                'Species': '10090',
                'Cell': 'astrocyte'
            },
            subject_modifier=secretion())

        self.assertTrue(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.assertFalse(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))
Example #2
0
    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))
Example #3
0
    def test_object_has_secretion(self):
        """p(MGI:Il4) increases sec(p(MGI:Cxcl1))"""
        g = BELGraph()
        u_node = protein(name='Il4', namespace='MGI')
        v_node = protein(name='Cxcl1', namespace='MGI')
        u = g.add_node_from_data(u_node)
        v = g.add_node_from_data(v_node)

        g.add_increases(
            u_node,
            v_node,
            citation='10072486',
            evidence=
            'Compared with controls treated with culture medium alone, IL-4 and IL-5 induced significantly '
            'higher levels of MIP-2 and KC production; IL-4 also increased the production of MCP-1 '
            '(Fig. 2, A and B)....we only tested the effects of IL-3, IL-4, IL-5, and IL-13 on chemokine '
            'expression and cellular infiltration....Recombinant cytokines were used, ... to treat naive '
            'BALB/c mice.',
            annotations={
                'Species': '10090',
                'MeSH': 'bronchoalveolar lavage fluid'
            },
            object_modifier=secretion())

        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))
Example #4
0
    def test_p1_active(self):
        """cat(p(HGNC:HSD11B1)) increases deg(a(CHEBI:cortisol))"""
        g = BELGraph()

        u = protein(name='HSD11B1', namespace='HGNC')
        v = abundance(name='cortisol', namespace='CHEBI', identifier='17650')

        g.add_increases(
            u,
            v,
            citation={
                NAMESPACE: CITATION_TYPE_ONLINE, IDENTIFIER: 'https://www.ncbi.nlm.nih.gov/gene/3290'
            },
            evidence="Entrez Gene Summary: Human: The protein encoded by this gene is a microsomal enzyme that "
                     "catalyzes the conversion of the stress hormone cortisol to the inactive metabolite cortisone. "
                     "In addition, the encoded protein can catalyze the reverse reaction, the conversion of cortisone "
                     "to cortisol. Too much cortisol can lead to central obesity, and a particular variation in this "
                     "gene has been associated with obesity and insulin resistance in children. Two transcript "
                     "variants encoding the same protein have been found for this gene.",
            annotations={'Species': '9606'},
            source_modifier=activity('cat'),
            target_modifier=degradation(),
        )

        self.assertFalse(is_translocated(g, u))
        self.assertFalse(is_degraded(g, u))
        self.assertTrue(has_activity(g, u))

        self.assertFalse(is_translocated(g, v))
        self.assertTrue(is_degraded(g, v))
        self.assertFalse(has_activity(g, v))