コード例 #1
0
 def test_sampleHolesUniformly_realdata(self):
     path = ('/pbi/dept/secondary/siv/testdata/SA3-Sequel/'
             'lambda/315/3150128/r54008_20160308_001811/'
             '2_B01/m54008_160308_053311.subreads.bam')
     ds = SubreadSet(path, strict=True)
     samples = sampleHolesUniformly(100, ds.index.holeNumber)
     self.assertEqual(len(samples), 100)
コード例 #2
0
 def test_sampleHolesUniformly(self):
     ncols = 1144
     nrows = 1024
     bounds = [(64, ncols), (64, nrows)]
     expected = [xy_to_hn(x, y) for x,y in sampleUniformly(100, bounds)]
     all_xy = quadratic_expand([range(64, ncols), range(64, nrows)])
     all_holes = [xy_to_hn(x, y) for x, y in all_xy]
     samples = sampleHolesUniformly(100, all_holes)
     self.assertEqual(expected, samples)