本文整理匯總了Python中puzzle.plugins.VcfPlugin.variant方法的典型用法代碼示例。如果您正苦於以下問題:Python VcfPlugin.variant方法的具體用法?Python VcfPlugin.variant怎麽用?Python VcfPlugin.variant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類puzzle.plugins.VcfPlugin
的用法示例。
在下文中一共展示了VcfPlugin.variant方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_variant
# 需要導入模塊: from puzzle.plugins import VcfPlugin [as 別名]
# 或者: from puzzle.plugins.VcfPlugin import variant [as 別名]
def test_variant():
vcf_plugin = VcfPlugin(root_path=vcf)
variant = vcf_plugin.variant('hapmap.vcf', 'X_155239821_G_A')
assert variant['CHROM'] == 'X'
assert variant['POS'] == '155239821'
# get 10th variant
variant = vcf_plugin.variant('hapmap.vcf', '3_124998098_C_A')
assert variant['index'] == 10
示例2: test_variant
# 需要導入模塊: from puzzle.plugins import VcfPlugin [as 別名]
# 或者: from puzzle.plugins.VcfPlugin import variant [as 別名]
def test_variant(case_obj):
vcf_plugin = VcfPlugin()
vcf_plugin.add_case(case_obj)
variant = vcf_plugin.variant(case_obj.case_id, 'X_155239821_G_A')
assert variant['CHROM'] == 'X'
assert int(variant['POS']) == 155239821
# get 10th variant
variant = vcf_plugin.variant(case_obj.case_id, '3_124998098_C_A')
assert variant['index'] == 10