本文整理汇总了Python中oncotator.Annotator.Annotator.retrieve_transcripts_by_genes方法的典型用法代码示例。如果您正苦于以下问题:Python Annotator.retrieve_transcripts_by_genes方法的具体用法?Python Annotator.retrieve_transcripts_by_genes怎么用?Python Annotator.retrieve_transcripts_by_genes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oncotator.Annotator.Annotator
的用法示例。
在下文中一共展示了Annotator.retrieve_transcripts_by_genes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_querying_transcripts_by_genes
# 需要导入模块: from oncotator.Annotator import Annotator [as 别名]
# 或者: from oncotator.Annotator.Annotator import retrieve_transcripts_by_genes [as 别名]
def test_querying_transcripts_by_genes(self):
"""Test that we can get all of the transcripts for a given set of genes. """
datasource_list = DatasourceFactory.createDatasources(self._determine_db_dir(), "hg19", isMulticore=False)
annotator = Annotator()
for ds in datasource_list:
annotator.addDatasource(ds)
# Step 1 get all of the relevant transcripts
txs = annotator.retrieve_transcripts_by_genes(["MAPK1", "PIK3CA"])
self.assertTrue(len(txs) > 3)
示例2: test_simple_genes_by_gene_annotation
# 需要导入模块: from oncotator.Annotator import Annotator [as 别名]
# 或者: from oncotator.Annotator.Annotator import retrieve_transcripts_by_genes [as 别名]
def test_simple_genes_by_gene_annotation(self):
"""Test web api backend call /gene/ """
# http://www.broadinstitute.org/oncotator/gene/MAPK1/
datasource_list = DatasourceFactory.createDatasources(self._determine_db_dir(), "hg19", isMulticore=False)
annotator = Annotator()
for ds in datasource_list:
annotator.addDatasource(ds)
txs = annotator.retrieve_transcripts_by_genes(["MAPK1"])
self.assertTranscriptsFound(txs)
mut_dict = annotator.annotate_genes_given_txs(txs)
self.assertTrue(len(mut_dict.keys()) == 1)