本文整理匯總了Python中oncotator.TranscriptProviderUtils.TranscriptProviderUtils.convert_genomic_space_to_transcript_space方法的典型用法代碼示例。如果您正苦於以下問題:Python TranscriptProviderUtils.convert_genomic_space_to_transcript_space方法的具體用法?Python TranscriptProviderUtils.convert_genomic_space_to_transcript_space怎麽用?Python TranscriptProviderUtils.convert_genomic_space_to_transcript_space使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類oncotator.TranscriptProviderUtils.TranscriptProviderUtils
的用法示例。
在下文中一共展示了TranscriptProviderUtils.convert_genomic_space_to_transcript_space方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_convert_genomic_space_to_transcript_space
# 需要導入模塊: from oncotator.TranscriptProviderUtils import TranscriptProviderUtils [as 別名]
# 或者: from oncotator.TranscriptProviderUtils.TranscriptProviderUtils import convert_genomic_space_to_transcript_space [as 別名]
def test_convert_genomic_space_to_transcript_space(self):
base_config_location = "testdata/ensembl/saccer/"
ensembl_ds = DatasourceFactory.createDatasource(base_config_location + "ensembl.config", base_config_location)
tx = ensembl_ds.get_overlapping_transcripts("I", "350", "350") # transcript starts at 335.
start, end = TranscriptProviderUtils.convert_genomic_space_to_transcript_space("350", "350", tx[0])
self.assertTrue(start == end)
self.assertTrue(start == 16)
tx = ensembl_ds.get_overlapping_transcripts("II", "764690", "764690") # transcript starts at 764697 (strand is '-').
start, end = TranscriptProviderUtils.convert_genomic_space_to_transcript_space("764690", "764690", tx[0])
self.assertTrue(start == end)
self.assertTrue(start == 7)
start, end = TranscriptProviderUtils.convert_genomic_space_to_transcript_space("764680", "764690", tx[0])
self.assertTrue(start == (end - 10))
self.assertTrue(start == 7)