def test_tarball_fail_missing_data(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory( os.path.join(inDir, 'bcl-runinfo.tar.gz')) as idir: self.assertRaises(Exception, idir.get_SampleSheet()) with illumina.IlluminaDirectory( os.path.join(inDir, 'bcl-samplesheet.tar.gz')) as idir: self.assertRaises(Exception, idir.get_RunInfo())
def test_tarball_normal(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory(os.path.join(inDir, 'bcl-plain.tgz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) with illumina.IlluminaDirectory( os.path.join(inDir, 'bcl-plain.tar.bz2')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir()))
def test_tarball_sample_sheet(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory(os.path.join(inDir, 'bcl-samplesheet.tar.gz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) self.assertEqual(len(idir.get_SampleSheet().get_rows()), 15) with illumina.IlluminaDirectory(os.path.join(inDir, 'bcl-both.tar.gz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) self.assertEqual(len(idir.get_SampleSheet().get_rows()), 15)
def test_tarball_run_info(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory(os.path.join(inDir, 'bcl-runinfo.tar.gz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) self.assertEqual(idir.get_RunInfo().get_flowcell(), 'AHVPA') self.assertEqual(idir.get_RunInfo().get_machine(), 'M04004') self.assertEqual(idir.get_RunInfo().get_rundate_iso(), '2015-08-27') with illumina.IlluminaDirectory(os.path.join(inDir, 'bcl-both.tar.gz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) self.assertEqual(idir.get_RunInfo().get_flowcell(), 'AHVPA') self.assertEqual(idir.get_RunInfo().get_read_structure(), '101T8B8B101T')
def test_directory(self): inDir = util.file.get_test_input_path(self) test_in = os.path.join(inDir, 'empty_dir') with illumina.IlluminaDirectory(test_in) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir()))
def test_zip_archive(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory(os.path.join( inDir, 'bcl-both-2.zip')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir())) self.assertEqual(len(idir.get_SampleSheet().get_rows()), 15)
def test_tarball_indented(self): inDir = util.file.get_test_input_path(self) with illumina.IlluminaDirectory(os.path.join( inDir, 'bcl-indented.tgz')) as idir: self.assertTrue(os.path.isdir(idir.get_BCLdir()))