def test_gene_from_transcript(self): ret_by_id = get_genes("ENST00000288135", "transcript") ret_by_name = get_genes("KIT-201", "transcript") self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_id]) self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_name]) self.assertEqual(ret_by_id, ret_by_name)
def test_gene_from_gene(self): ret_by_id = get_genes("ENSG00000157404", "gene") ret_by_name = get_genes("KIT", "gene") self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_id]) self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_name]) self.assertEqual(ret_by_id, ret_by_name)
def test_gene_from_protein(self): ret_by_id = get_genes("ENSP00000288135", "protein") self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_id])
def test_gene_from_exon(self): ret_by_id = get_genes("ENSE00001074448", "exon") self.assertTrue("ENSG00000157404" in [i.gene_id for i in ret_by_id])