コード例 #1
0
 def test_primer_set_list(self):
     obs = PrimerSet.list_primer_sets()
     exp = [{'primer_set_id': 1, 'external_id': 'EMP 16S V4 primer set',
             'target_name': 'Amplicon'},
            {'primer_set_id': 2, 'external_id': 'iTru shotgun primer set',
             'target_name': 'Shotgun'}]
     self.assertEqual(obs, exp)
コード例 #2
0
 def test_primer_set_attributes(self):
     obs = PrimerSet(1)
     self.assertEqual(obs.external_id, 'EMP 16S V4 primer set')
     self.assertEqual(obs.target_name, 'Amplicon')
     self.assertIsNone(obs.notes)
     self.assertEqual(obs.plates, [Plate(1), Plate(2), Plate(3), Plate(4),
                                   Plate(5), Plate(6), Plate(7), Plate(8)])
コード例 #3
0
    def post(self):
        primer_set = self.get_argument('primer_set')
        master_set_order = self.get_argument('master_set_order')
        creation_date = self.get_argument('creation_date')

        month, day, year = map(int, creation_date.split('/'))
        creation_date = date(year, month, day)

        process = PrimerWorkingPlateCreationProcess.create(
            self.current_user, PrimerSet(primer_set), master_set_order,
            creation_date)
        self.write({'process': process.id})
コード例 #4
0
 def get(self):
     primer_sets = PrimerSet.list_primer_sets()
     self.render('primer_plates.html', primer_sets=primer_sets)
コード例 #5
0
 def test_primer_set_attributes(self):
     obs = PrimerSet(1)
     self.assertEqual(obs.external_id, 'EMP primer set')
     self.assertEqual(obs.target_name, '16S V4')
     self.assertIsNone(obs.notes)