Exemplo n.º 1
0
 def test_isatab2sra_dump_run_set_xml_biis7(self):
     isatab2sra.convert(self._biis7_dir,
                        self._tmp_dir,
                        validate_first=False)
     with open(os.path.join(self._tmp_dir, 'run_set.xml'), 'rb') as rs_fp:
         run_set_xml = rs_fp.read()
         actual_run_set_xml_biis7 = etree.fromstring(run_set_xml)
         self.assertTrue(
             utils.assert_xml_equal(self._expected_run_set_xml_biis7,
                                    actual_run_set_xml_biis7))
Exemplo n.º 2
0
 def test_isatab2sra_dump_sample_set_xml_biis3(self):
     isatab2sra.convert(self._biis3_dir,
                        self._tmp_dir,
                        validate_first=False)
     sample_set_xml = open(os.path.join(self._tmp_dir, 'sample_set.xml'),
                           'rb').read()
     actual_sample_set_xml_biis3 = etree.fromstring(sample_set_xml)
     self.assertTrue(
         utils.assert_xml_equal(self._expected_sample_set_xml_biis3,
                                actual_sample_set_xml_biis3))
Exemplo n.º 3
0
 def test_isatab2sra_dump_experiment_set_xml_biis7(self):
     isatab2sra.convert(self._biis7_dir,
                        self._tmp_dir,
                        validate_first=False)
     experiment_set_xml = open(
         os.path.join(self._tmp_dir, 'experiment_set.xml'), 'rb').read()
     actual_experiment_set_xml_biis7 = etree.fromstring(experiment_set_xml)
     self.assertTrue(
         utils.assert_xml_equal(self._expected_experiment_set_xml_biis7,
                                actual_experiment_set_xml_biis7))
Exemplo n.º 4
0
 def test_isatab2sra_dump_submission_xml_biis3(self):
     isatab2sra.convert(self._biis3_dir,
                        self._tmp_dir,
                        validate_first=False)
     with open(os.path.join(self._tmp_dir, 'submission.xml'),
               'rb') as sub_fp:
         submission_xml = sub_fp.read()
         actual_submission_xml_biis3 = etree.fromstring(submission_xml)
         self.assertTrue(
             utils.assert_xml_equal(self._expected_submission_xml_biis3,
                                    actual_submission_xml_biis3))
Exemplo n.º 5
0
 def test_isatab2sra_dump_project_set_xml_biis3(self):
     isatab2sra.convert(self._biis3_dir,
                        self._tmp_dir,
                        validate_first=False)
     with open(os.path.join(self._tmp_dir, 'project_set.xml'),
               'rb') as ps_fp:
         project_set_xml = ps_fp.read()
         actual_project_set_xml_biis3 = etree.fromstring(project_set_xml)
         self.assertTrue(
             utils.assert_xml_equal(self._expected_project_set_xml_biis3,
                                    actual_project_set_xml_biis3))
Exemplo n.º 6
0
 def test_isatab2sra_dump_submission_xml_biis7(self):
     sra_settings = {
         "sra_broker": "",
         "sra_center": "OXFORD",
         "sra_project": "OXFORD",
         "sra_lab": "Oxford e-Research Centre",
         "sra_broker_inform_on_status": "*****@*****.**",
         "sra_broker_inform_on_error": "*****@*****.**",
         "sra_broker_contact_name": "PRS"
     }
     isatab2sra.convert(self._biis3_dir, self._tmp_dir, sra_settings=sra_settings, validate_first=False)
     submission_xml = open(os.path.join(self._tmp_dir, 'submission.xml'), 'rb').read()
     actual_submission_xml_biis7 = etree.fromstring(submission_xml)
     self.assertTrue(utils.assert_xml_equal(self._expected_submission_xml_biis7, actual_submission_xml_biis7))
Exemplo n.º 7
0
 def test_isatab2sra_dump_submission_xml_biis7(self):
     sra_settings = {
         "sra_broker": "",
         "sra_center": "OXFORD",
         "sra_project": "OXFORD",
         "sra_lab": "Oxford e-Research Centre",
         "sra_broker_inform_on_status": "*****@*****.**",
         "sra_broker_inform_on_error": "*****@*****.**",
         "sra_broker_contact_name": "PRS"
     }
     isatab2sra.convert(self._biis3_dir, self._tmp_dir, sra_settings=sra_settings, validate_first=False)
     submission_xml = open(os.path.join(self._tmp_dir, 'submission.xml'), 'rb').read()
     actual_submission_xml_biis7 = etree.fromstring(submission_xml)
     self.assertTrue(utils.assert_xml_equal(self._expected_submission_xml_biis7, actual_submission_xml_biis7))
Exemplo n.º 8
0
 def test_isatab2sra_zip_return(self):
     b = isatab2sra.convert(self._biis3_dir,
                            self._tmp_dir,
                            validate_first=False)
     self.assertIsInstance(b, BytesIO)
     with ZipFile(b) as zip_file:
         self.assertEqual(len(zip_file.namelist()), 5)
Exemplo n.º 9
0
 def test_isatab2sra_dump_project_set_xml_biis7(self):
     isatab2sra.convert(self._biis7_dir, self._tmp_dir, validate_first=False)
     project_set_xml = open(os.path.join(self._tmp_dir, 'project_set.xml'), 'rb').read()
     actual_project_set_xml_biis7 = etree.fromstring(project_set_xml)
     self.assertTrue(utils.assert_xml_equal(self._expected_project_set_xml_biis7, actual_project_set_xml_biis7))
Exemplo n.º 10
0
 def test_isatab2sra_dump_run_set_xml_biis3(self):
     isatab2sra.convert(self._biis3_dir, self._tmp_dir, validate_first=False)
     run_set_xml = open(os.path.join(self._tmp_dir, 'run_set.xml'), 'rb').read()
     actual_run_set_xml_biis3 = etree.fromstring(run_set_xml)
     self.assertTrue(utils.assert_xml_equal(self._expected_run_set_xml_biis3, actual_run_set_xml_biis3))
Exemplo n.º 11
0
 def test_isatab2sra_zip_return(self):
     b = isatab2sra.convert(self._biis3_dir, self._tmp_dir, validate_first=False)
     self.assertIsInstance(b, BytesIO)
     with ZipFile(b) as zip_file:
         self.assertEquals(len(zip_file.namelist()), 5)
Exemplo n.º 12
0
 def test_isatab2sra_zip_return(self):
     b = isatab2sra.convert(self._biis3_dir, self._tmp_dir, validate_first=False)  # TODO: To use new parser, need dervives_from completed
     self.assertIsInstance(b, BytesIO)
     with ZipFile(b) as zip_file:
         self.assertEquals(len(zip_file.namelist()), 5)