Skip to content

Commit

Permalink
Add more tests for sample sheet parsing with underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jul 10, 2024
1 parent f75c583 commit 59cdb0b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion micall/tests/test_sample_sheet_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def test_extra_commas(self):

def test_underscores_in_sample_name(self):
"""
Extracts the correct project code having multiple options.
Extracts the correct project code and sample name in presence of underscores.
"""

stub_sample_sheet = """
Expand Down Expand Up @@ -764,9 +764,19 @@ def test_underscores_in_sample_name(self):
ss = sample_sheet_parser(StringIO(stub_sample_sheet))
split_rows = ss['DataSplit']
assert len(split_rows) == 2

assert split_rows[0]['filename'] == 'Sample1-Proj1_S1'
assert split_rows[1]['filename'] == 'Sample2-Proj2_S2'

assert split_rows[0]['project'] == 'Proj1'
assert split_rows[1]['project'] == 'Proj2'

assert split_rows[0]['sample'] == 'Sample1'
assert split_rows[1]['sample'] == 'Sample2'

assert split_rows[0]['sample_number'] == 'S1'
assert split_rows[1]['sample_number'] == 'S2'


def test_read_sample_sheet_overrides(tmpdir):
sample_sheet_path = Path(str(tmpdir)) / 'SampleSheet.csv'
Expand Down

0 comments on commit 59cdb0b

Please sign in to comment.