Пример #1
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))
Пример #2
0
    def test_object_degradation(self):
        self.graph.add_increases(
            Protein(name='YFG', namespace='HGNC'),
            Protein(name='YFG2', namespace='HGNC'),
            evidence=n(),
            citation=n(),
            object_modifier=degradation(),
        )
        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()
    def test_convert_degradates(self):
        """Test the conversion of a bel statement like A -> deg(B)."""

        microglia = abundance('MeSH', 'Microglia', 'MeSH:D017628')
        abeta = abundance('CHEBI', 'amyloid-β', 'CHEBI:64645')

        # a(MESH:Microglia) reg deg(a(CHEBI:"amyloid-beta"))
        bel_graph = BELGraph()
        bel_graph.add_increases(microglia,
                                abeta,
                                evidence='10.1038/s41586-018-0368-8',
                                citation='PubMed:30046111',
                                object_modifier=degradation())

        expected_reified_graph = self.help_make_simple_expected_graph(
            microglia, abeta, DEGRADATES, 0, self.help_causal_increases)

        reified_graph = reify_bel_graph(bel_graph)
        self.help_test_graphs_equal(expected_reified_graph, reified_graph)
Пример #4
0
    def test_subject_degradation_location(self):
        self.assertEqual(self.add_edge(source_modifier=degradation()),
                         self.add_edge(source_modifier=degradation()))

        self.assertEqual(
            self.add_edge(source_modifier=degradation(
                location=Entity(name='somewhere', namespace='GO'))),
            self.add_edge(source_modifier=degradation(
                location=Entity(name='somewhere', namespace='GO'))))

        self.assertNotEqual(
            self.add_edge(source_modifier=degradation()),
            self.add_edge(source_modifier=degradation(
                location=Entity(name='somewhere', namespace='GO'))))