本文整理汇总了Python中pbcore.io.SubreadSet.induceIndices方法的典型用法代码示例。如果您正苦于以下问题:Python SubreadSet.induceIndices方法的具体用法?Python SubreadSet.induceIndices怎么用?Python SubreadSet.induceIndices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pbcore.io.SubreadSet
的用法示例。
在下文中一共展示了SubreadSet.induceIndices方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_isBarcoded
# 需要导入模块: from pbcore.io import SubreadSet [as 别名]
# 或者: from pbcore.io.SubreadSet import induceIndices [as 别名]
def test_isBarcoded(self):
empty = upstreamdata.getEmptyBam()
nonempty = ('/pbi/dept/secondary/siv/testdata/'
'pblaa-unittest/Sequel/Phi29/m54008_160219_003234'
'.tiny.subreadset.xml')
# One empty one non empty
sset = SubreadSet(nonempty, empty, skipMissing=True)
self.assertTrue(sset.isBarcoded)
# Just nonempty
sset = SubreadSet(nonempty, skipMissing=True)
self.assertEqual(len(sset), 15133)
self.assertTrue(sset.isBarcoded)
# Just empty
# This is crazy, the pbi must be out of date:
sset = SubreadSet(empty)
self.assertEqual(len(sset), 0)
self.assertTrue(sset.isBarcoded)
# To confirm current behavior, I will regenerate the pbi with a
# current pbindex:
efn = tempfile.NamedTemporaryFile(suffix=".subreadset.xml").name
log.info("Copying to {}".format(efn))
sset.copyTo(efn)
sset.induceIndices(force=True)
self.assertFalse(sset.isBarcoded)