示例#1
0
 def test_sample_lendist_stat(self):
     stat = cdr3len.sample_lendist_stat(self.s1)
     l2c = {1: 0.25, 2: 0.5, 3: 0.25}
     l2r = {1: 0.1, 2: 0.7, 3: 0.2}
     self.assertEqual(stat.len2clones, l2c)
     self.assertEqual(stat.len2reads, l2r)
     self.assertEqual(stat.median_clones, 2)
     self.assertEqual(stat.median_reads, 2)
示例#2
0
 def test_get_lens(self):
     stat1 = cdr3len.sample_lendist_stat(self.s1)
     stat2 = cdr3len.sample_lendist_stat(self.s2)
     ls = cdr3len.get_lens([stat1, stat2])
     self.assertEqual(ls, [1, 2, 3, 6])