Skip to content

Commit a69f035

Browse files
committed
Add a failing test for sample sheet parser
This case tests the behaviour described in #888 When the issue is solved, we should unmark this case as "Failure".
1 parent 06a1064 commit a69f035

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

micall/tests/test_sample_sheet_parser.py

+37
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,43 @@ def test_extra_commas(self):
730730
ss = sample_sheet_parser(StringIO(stub_sample_sheet))
731731
self.assertEqual(ss["Experiment Name"], "10-Jul-2014")
732732

733+
@unittest.expectedFailure
734+
def test_underscores_in_sample_name(self):
735+
"""
736+
Extracts the correct project code having multiple options.
737+
"""
738+
739+
stub_sample_sheet = """
740+
[Header]
741+
IEMFileVersion,3
742+
Investigator Name,RL
743+
Project Name,10-Jul-2014_v1test
744+
Experiment Name,10-Jul-2014_v1test
745+
Date,07/10/2014
746+
Workflow,GenerateFASTQ
747+
Assay,Nextera
748+
Description,Nextera
749+
Chemistry,Amplicon
750+
[Reads]
751+
251
752+
251
753+
[Settings]
754+
[Data]
755+
Sample_ID,Sample_Name,Sample_Plate,Sample_Well,index,index2,Sample_Project,Description,GenomeFolder
756+
CFE_SomeId_10-Jul-2014_N501-N701_Sample1_Proj1,Sample1_Proj1,10-Jul-2014_testing,N/A,ACGTACGT,TGCATGCA,\
757+
10-Jul-2014_testing,Research:Sample1_Proj1:TRUE Comments:Sample1_Proj1:thisiscommentone \
758+
Disablecontamcheck:Sample1_Proj1:FALSE,
759+
CFE_SomeId_10-Jul-2014_N501-N702_Sample2_Proj2,Sample2_Proj2,10-Jul-2014_testing,N/A,AAAAGGGG,CCCCTTTT,\
760+
10-Jul-2014_testing,Research:Sample2_Foo_Proj2:FALSE Comments:Sample2_Foo_Proj2:thisiscommenttwo \
761+
Chemistry:Sample2_Foo_Proj2:BreakingBad Disablecontamcheck:Sample2_Foo_Proj2:TRUE,
762+
"""
763+
764+
ss = sample_sheet_parser(StringIO(stub_sample_sheet))
765+
split_rows = ss['DataSplit']
766+
assert len(split_rows) == 2
767+
assert split_rows[0]['project'] == 'Proj1'
768+
assert split_rows[1]['project'] == 'Proj2'
769+
733770

734771
def test_read_sample_sheet_overrides(tmpdir):
735772
sample_sheet_path = Path(str(tmpdir)) / 'SampleSheet.csv'

0 commit comments

Comments
 (0)