コード例 #1
0
 def test_library_prep_16S_composition_attributes(self):
     obs = LibraryPrep16SComposition(1)
     self.assertEqual(obs.container, Well(3075))
     self.assertEqual(obs.total_volume, 10)
     self.assertIsNone(obs.notes)
     self.assertEqual(obs.gdna_composition, GDNAComposition(1))
     self.assertEqual(obs.primer_composition, PrimerComposition(1))
     self.assertEqual(obs.composition_id, 3083)
コード例 #2
0
 def test_pool_composition_attributes(self):
     obs = PoolComposition(1)
     self.assertEqual(obs.container, Tube(6))
     self.assertEqual(obs.total_volume, 96)
     self.assertIsNone(obs.notes)
     self.assertEqual(obs.composition_id, 3078)
     obs_comp = obs.components
     self.assertEqual(len(obs_comp), 96)
     exp = {'composition': LibraryPrep16SComposition(1),
            'input_volume': 1.0, 'percentage_of_output': 0}
     self.assertEqual(obs_comp[0], exp)
     self.assertEqual(obs.raw_concentration, 1.5)
コード例 #3
0
 def test_composition_factory(self):
     self.assertEqual(Composition.factory(3073), ReagentComposition(1))
     self.assertEqual(Composition.factory(1537), PrimerComposition(1))
     self.assertEqual(Composition.factory(1), PrimerSetComposition(1))
     self.assertEqual(Composition.factory(3081), SampleComposition(1))
     self.assertEqual(Composition.factory(3082), GDNAComposition(1))
     self.assertEqual(Composition.factory(3083),
                      LibraryPrep16SComposition(1))
     self.assertEqual(Composition.factory(3085),
                      NormalizedGDNAComposition(1))
     self.assertEqual(Composition.factory(3086),
                      LibraryPrepShotgunComposition(1))
     self.assertEqual(Composition.factory(3078), PoolComposition(1))
コード例 #4
0
 def test_pool_composition_get_components_type(self):
     obs1 = PoolComposition.get_components_type([PoolComposition(1)])
     self.assertEqual(obs1, PoolComposition)
     obs2 = PoolComposition.get_components_type(
         [LibraryPrep16SComposition(1)])
     self.assertEqual(obs2, LibraryPrep16SComposition)
コード例 #5
0
 def test_pool_composition_get_components_type_multiple_raises(self):
     with self.assertRaises(ValueError):
         PoolComposition.get_components_type(
             [LibraryPrep16SComposition(1),
              PoolComposition(1)])