示例#1
0
 def test_gene_fusion_missing_implicit(self):
     """Test serialization of a gene fusion to BEL with a implicit missing fusion ranges."""
     dsl = GeneFusion(
         Gene('HGNC', 'TMPRSS2'),
         Gene('HGNC', 'ERG'),
     )
     self.assertEqual('g(fus(HGNC:TMPRSS2, "?", HGNC:ERG, "?"))', dsl.as_bel())
示例#2
0
 def test_GeneFusion(self):
     """Test serialization of a gene fusion to BEL with a explicit fusion ranges."""
     dsl = GeneFusion(Gene('HGNC', 'TMPRSS2'), Gene('HGNC', 'ERG'),
                      EnumeratedFusionRange('c', 1, 79),
                      EnumeratedFusionRange('c', 312, 5034))
     self.assertEqual(
         'g(fus(HGNC:TMPRSS2, "c.1_79", HGNC:ERG, "c.312_5034"))',
         dsl.as_bel())
示例#3
0
 def test_fusion_specified(self, mock):
     node_data = GeneFusion(
         Gene('HGNC', 'TMPRSS2'),
         Gene('HGNC', 'ERG'),
         EnumeratedFusionRange('c', 1, 79),
         EnumeratedFusionRange('c', 312, 5034),
     )
     self._help_reconstitute(node_data, 1, 0)
    def test_gene_fusion_specified(self):
        node = GeneFusion(partner_5p=Gene(namespace='HGNC', name='TMPRSS2'),
                          range_5p=EnumeratedFusionRange('c', 1, 79),
                          partner_3p=Gene(namespace='HGNC', name='ERG'),
                          range_3p=EnumeratedFusionRange('c', 312, 5034))

        self.assertEqual(
            'g(fus(HGNC:TMPRSS2, "c.1_79", HGNC:ERG, "c.312_5034"))',
            str(node))
示例#5
0
    def test_fusion(self):
        node_data = GeneFusion(partner_5p=Gene('HGNC', 'TMPRSS2'),
                               partner_3p=Gene('HGNC', 'ERG'),
                               range_5p=EnumeratedFusionRange('c', 1, 79),
                               range_3p=EnumeratedFusionRange('c', 312, 5034))
        node_data = node_data

        self.graph.add_node_from_data(node_data)
        self.assertIn(node_data, self.graph)
        self.assertEqual(1, self.graph.number_of_nodes())
        self.assertEqual(0, self.graph.number_of_edges())
示例#6
0
cftr = hgnc('CFTR')
cftr_protein_unspecified_variant = cftr.with_variants(HgvsUnspecified())
cftr_protein_phe_508_del = cftr.with_variants(Hgvs('p.Phe508del'))

adenocarcinoma = Pathology('MESHD', 'Adenocarcinoma')
interleukin_23_complex = NamedComplexAbundance('GO', 'interleukin-23 complex')

oxygen_atom = Abundance(namespace='CHEBI', name='oxygen atom')
hydrogen_peroxide = Abundance('CHEBI', 'hydrogen peroxide')

tmprss2_gene = Gene('HGNC', 'TMPRSS2')

tmprss2_erg_gene_fusion = GeneFusion(
    partner_5p=tmprss2_gene,
    range_5p=EnumeratedFusionRange('c', 1, 79),
    partner_3p=Gene('HGNC', 'ERG'),
    range_3p=EnumeratedFusionRange('c', 312, 5034)
)

bcr_jak2_gene_fusion = GeneFusion(
    partner_5p=Gene('HGNC', 'BCR'),
    range_5p=EnumeratedFusionRange('c', '?', 1875),
    partner_3p=Gene('HGNC', 'JAK2'),
    range_3p=EnumeratedFusionRange('c', 2626, '?')
)

chchd4_aifm1_gene_fusion = GeneFusion(
    partner_5p=Gene('HGNC', 'CHCHD4'),
    partner_3p=Gene('HGNC', 'AIFM1')
)
示例#7
0
 def test_fusion_unspecified(self, mock):
     node_data = GeneFusion(
         Gene('HGNC', 'TMPRSS2'),
         Gene('HGNC', 'ERG'),
     )
     self._help_reconstitute(node_data, 1, 0)