本文整理汇总了Python中oncotator.input.VcfInputMutationCreator.VcfInputMutationCreator.reset方法的典型用法代码示例。如果您正苦于以下问题:Python VcfInputMutationCreator.reset方法的具体用法?Python VcfInputMutationCreator.reset怎么用?Python VcfInputMutationCreator.reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oncotator.input.VcfInputMutationCreator.VcfInputMutationCreator
的用法示例。
在下文中一共展示了VcfInputMutationCreator.reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testBasicCreationWithExampleVcf
# 需要导入模块: from oncotator.input.VcfInputMutationCreator import VcfInputMutationCreator [as 别名]
# 或者: from oncotator.input.VcfInputMutationCreator.VcfInputMutationCreator import reset [as 别名]
def testBasicCreationWithExampleVcf(self):
"""
Tests the ability to parse an input VCF file can be parsed without any errors.
"""
inputFilename = os.path.join(*["testdata", "vcf", "example.vcf"])
creator = VcfInputMutationCreator(inputFilename)
muts = creator.createMutations()
# You cannot use len(muts), since muts is a generator.
ctr = 0
for m in muts:
ctr += 1
self.assertTrue(ctr == 27, "Should have seen 27 (# REF alleles x # samples) mutations, but saw: " + str(ctr))
self.assertTrue((m.chr == "21") and (m.start == 1234569), "Last mutation was not correct: " + str(m))
# Reminder: muts is a generator, so it has to be reset
creator.reset()
muts = creator.createMutations()
ctr = 0
for m in muts:
ctr += 1
self.assertTrue(ctr == 27, "Should have seen 27 called mutations, but saw: " + str(ctr))