def test_gene_fusion_missing_implicit(self): """Test serialization of a gene fusion to BEL with a implicit missing fusion ranges.""" dsl = gene_fusion( gene('HGNC', 'TMPRSS2'), gene('HGNC', 'ERG'), ) self.assertEqual('g(fus(HGNC:TMPRSS2, "?", HGNC:ERG, "?"))', dsl.as_bel())
def test_gene_fusion(self): """Test serialization of a gene fusion to BEL with a explicit fusion ranges.""" dsl = gene_fusion(gene('HGNC', 'TMPRSS2'), gene('HGNC', 'ERG'), fusion_range('c', 1, 79), fusion_range('c', 312, 5034)) self.assertEqual( 'g(fus(HGNC:TMPRSS2, "c.1_79", HGNC:ERG, "c.312_5034"))', dsl.as_bel())
def test_gene_fusion_specified(self): node = gene_fusion(partner_5p=gene(namespace='HGNC', name='TMPRSS2'), range_5p=fusion_range('c', 1, 79), partner_3p=gene(namespace='HGNC', name='ERG'), range_3p=fusion_range('c', 312, 5034)) self.assertEqual( 'g(fus(HGNC:TMPRSS2, "c.1_79", HGNC:ERG, "c.312_5034"))', str(node))