def test_find_rv_variantkey_by_rsid_notfound(self): vk, first = bs.find_rv_variantkey_by_rsid(rvsrc, 0, 9, 0xfffffff0) self.assertEqual(vk, 0) self.assertEqual(first, 10)
def test_find_rv_variantkey_by_rsid(self): for item, _, _, _, rsid, vkey in testData: vk, first = bs.find_rv_variantkey_by_rsid(rvsrc, 0, 9, rsid) self.assertEqual(vk, vkey) self.assertEqual(first, item)
def test_find_rv_variantkey_by_rsid_notfound(self): vk, first = bs.find_rv_variantkey_by_rsid(rvmc, 0, rvnrows, 0xfffffff0) self.assertEqual(vk, 0) self.assertEqual(first, 9)
# /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # RSIDVAR # ------- # Load the lookup table for rsID to VariantKey. # The input binary file can be generated using the resources/tools/rsvk.sh script. # This example uses the "c/test/data/rsvk.10.bin". mf, mc, nrows = vk.mmap_rsvk_file('rsvk.10.bin', []) if nrows <= 0: assert False, "Unable to open the rsvk.10.bin file" vk.find_rv_variantkey_by_rsid(mc, 0, nrows, rsid=0X00000061) # (9223656209074749440, 3) vk.get_next_rv_variantkey_by_rsid(mc, 2, nrows, 0x00000061) # (9223656209074749440, 3) vk.munmap_binfile(mf) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Load the lookup table for rsID to VariantKey. # The input binary file can be generated using the resources/tools/rsvk.sh script. # This example uses the "c/test/data/rsvk.m.10.bin". mf, mc, nrows = vk.mmap_rsvk_file('rsvk.m.10.bin', []) if nrows <= 0: assert False, "Unable to open the rsvk.m.10.bin file"
# /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # RSIDVAR # ------- # Load the lookup table for rsID to VariantKey. # The input binary file can be generated using the resources/tools/vkhexbin.sh script. # This example uses the "c/test/data/rsvk.10.bin". mfsrc, mffd, mfsize, mflast = vk.mmap_binfile('rsvk.10.bin') if mffd < 0: assert False, "Unable to open the rsvk.10.bin file" print(vk.get_rv_variantkey(mfsrc, item=3)) # 9223656209074749440 print(vk.find_rv_variantkey_by_rsid(mfsrc, 0, 9, rsid=0X00000061)) # (9223656209074749440, 3) print(vk.get_next_rv_variantkey_by_rsid(mfsrc, 2, 9, 0x00000061)) # (9223656209074749440, 3) vk.munmap_binfile(mfsrc, mffd, mfsize) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Load the lookup table for rsID to VariantKey. # The input binary file can be generated using the resources/tools/vkhexbin.sh script. # This example uses the "c/test/data/rsvk.m.10.bin". mfsrc, mffd, mfsize, mflast = vk.mmap_binfile('rsvk.m.10.bin') if mffd < 0: assert False, "Unable to open the rsvk.m.10.bin file"