本文整理汇总了Python中TestUtils.TestUtils.createUnitTestConfig方法的典型用法代码示例。如果您正苦于以下问题:Python TestUtils.createUnitTestConfig方法的具体用法?Python TestUtils.createUnitTestConfig怎么用?Python TestUtils.createUnitTestConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestUtils.TestUtils
的用法示例。
在下文中一共展示了TestUtils.createUnitTestConfig方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_annotating_uniprot_test_file
# 需要导入模块: from TestUtils import TestUtils [as 别名]
# 或者: from TestUtils.TestUtils import createUnitTestConfig [as 别名]
def test_annotating_uniprot_test_file(self):
"""Test variants with known issues with older version of UniProt datasource. This test will fail if using older version of uniprot datasource (pre-2014) """
db_dir = TestUtils.createUnitTestConfig().get('DEFAULT',"dbDir")
annotator = Annotator()
out_file_name = "out/uniprot_recovery.maf.annotated"
runSpec = RunSpecificationFactory.create_run_spec("MAFLITE", "TCGAMAF", "testdata/maflite/uniprot_recovery.maflite",
out_file_name, datasource_dir=db_dir, tx_mode=TranscriptProvider.TX_MODE_BEST_EFFECT)
annotator.initialize(runSpec)
annotator.annotate()
out_file_reader = GenericTsvReader(out_file_name)
for i,line_dict in enumerate(out_file_reader):
self.assertTrue(line_dict['UniProt_AApos'] != "0")
#TODO: The fourth entry is currently not picking up the uniprot entry for this. Remove the "if" statement once issue #253 is addressed
if i != 4:
self.assertTrue(line_dict['SwissProt_entry_Id'].endswith("HUMAN"))
开发者ID:Tmacme,项目名称:oncotator,代码行数:19,代码来源:TranscriptToUniProtProteinPositionTransformingDatasourceTest.py
示例2: setUp
# 需要导入模块: from TestUtils import TestUtils [as 别名]
# 或者: from TestUtils.TestUtils import createUnitTestConfig [as 别名]
def setUp(self):
self.logger = logging.getLogger(__name__)
self.config = TestUtils.createUnitTestConfig()
示例3: annotate_mutations_global
# 需要导入模块: from TestUtils import TestUtils [as 别名]
# 或者: from TestUtils.TestUtils import createUnitTestConfig [as 别名]
Mutation is a single mutation, not a list/generator."""
ds = t[0]
m = t[1]
return ds.annotate_mutation(m)
def annotate_mutations_global(t):
"""Annotate from any datasource given a tuple that is (datasource, mutations).
Mutations is a list."""
ds = t[1]
ms = t[0]
result = []
for m in ms:
result.append(ds.annotate_mutation(m))
return result
globalConfig = TestUtils.createUnitTestConfig()
TestUtils.setupLogging(__file__, __name__)
# globalConfig = TestUtils.createUnitTestConfig()
# @unittest.skipIf(not os.path.exists(globalConfig.get("gaf3.0", "gafDir")), "Default Datasource, with GAF 3.0, corpus is needed to run this test. GAF 3.0 will not be supported for much longer.")
@unittest.skipIf(not os.path.exists(globalConfig.get("gaf3.0", "gafDir")), "Default datasource corpus, with GAF 3.0, is needed to run this test.")
class GafDatasourceTest(unittest.TestCase):
# HACK: Allow config to be viewed by unittest decorators.
globalConfig = TestUtils.createUnitTestConfig()
def setUp(self):
self.logger = logging.getLogger(__name__)
self.config = TestUtils.createUnitTestConfig()
def tearDown(self):
示例4: setUp
# 需要导入模块: from TestUtils import TestUtils [as 别名]
# 或者: from TestUtils.TestUtils import createUnitTestConfig [as 别名]
def setUp(self):
self.config = TestUtils.createUnitTestConfig()
pass