def test_broad_platform(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet(os.path.join(inDir, 'SampleSheet-hiseq-1.csv'), only_lane=2) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 24) samples = illumina.SampleSheet(os.path.join(inDir, 'SampleSheet-hiseq-1.csv'), allow_non_unique=True) self.assertEqual(len(samples.get_rows()), 48)
def test_blank_line_in_tabular_section(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet( os.path.join( inDir, 'SampleSheet-in-Broad-MiSeq-Format_with_Picard_Block.csv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 11)
def test_inline_commas_strings(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet(os.path.join(inDir, 'SampleSheet-inline-commas-strings.csv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 18) sample_names = [r["sample"] for r in samples.get_rows()] names_to_validate = [ 'Zika "seedstock_1 (in K562, 5ng)', "Zika 'seedstock_3 (in K562, 5ng)", "Zika seedstock_7 (in K562, 10pg)" ] for sample_name in names_to_validate: assert util.file.string_to_file_name(sample_name) in sample_names
def test_tabfile(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet( os.path.join(inDir, 'SampleSheet-custom-1.txt')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 24)
def test_walkup_submission_no_lf(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet( os.path.join(inDir, 'SampleSheet-submit-3.csv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 24)
def test_miseq(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet( os.path.join(inDir, 'SampleSheet-miseq-1.csv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 20)
def test_blank_line_in_tabular_section(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet(os.path.join(inDir, 'SampleSheet-with-blanklines.csv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 12)
def test_tabfile_extras_win(self): inDir = util.file.get_test_input_path(self) samples = illumina.SampleSheet( os.path.join(inDir, 'SampleSheet-custom-2_win-endings.tsv')) self.assertEqual(samples.num_indexes(), 2) self.assertEqual(len(samples.get_rows()), 96)