Skip to content
Snippets Groups Projects
Commit a256a48b authored by cramakri's avatar cramakri
Browse files

MINOR: Fixed tests and synchronized handler scripts with desires of basynthec team

SVN: 24066
parent dfe3e7e5
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ from eu.basynthec.cisd.dss import TimeSeriesDataExcel
import re
# A Regex for matching the column headers
header_regex = re.compile("^(.+)-([0-9]) ([0-9]+)")
header_regex = re.compile("^(.+)-(.*) ([0-9]+)")
def set_data_type(data_set):
data_set.setPropertyValue("DATA_TYPE", "TRANSCRIPTOMICS")
......
......@@ -3,7 +3,7 @@ def validate_header(line, first_data_col, errors):
if line[0] != "Locustag":
errors.append(createFileValidationError("The first data column must be 'Locustag' (not " + line[0] + ")."))
return False
header_regex = re.compile("^(.+)-([0-9]) ([0-9]+)")
header_regex = re.compile("^(.+)-(.*) ([0-9]+)")
for i in range(first_data_col, len(line)):
match = header_regex.match(line[i])
if match is None:
......
......@@ -102,11 +102,11 @@ public class TimeSeriesDataExcelTest extends AssertJUnit
String[][] expectedData =
{
{ "Strain", "HumanReadable", "-19020.0", "-17220.0" },
{ "JJS-MGP1", "OD600", "0.05", "0.064" },
{ "JJS-MGP001", "OD600", "0.05", "0.064" },
{ "JJS-MGP100", "OD600", "0.05", "0.064" },
{ "JJS-MGP20", "OD600", "0.05", "0.064" },
{ "JJS-MGP020", "OD600", "0.05", "0.064" },
{ "JJS-MGP999", "OD600", "0.05", "0.064" },
{ "JJS-MGP1", "OD600", "0.05", "0.064" },
{ "JJS-MGP001", "OD600", "0.05", "0.064" },
{ "MS", "OD600", "0.05", "0.064" },
{ "WT 168 trp+", "OD600", "0.05", "0.064" } };
assertLinesAreEqual(dataLines, expectedData);
......
......@@ -82,10 +82,12 @@ public class OD600DataSetRegistratorTest extends AbstractBaSynthecDataSetRegistr
String[] contents = tsvSplitFolder.list();
Arrays.sort(contents);
String[] expectedContents =
{ "OD600-Example.xlsx_JJS-MGP1.tsv", "OD600-Example.xlsx_JJS-MGP100.tsv",
"OD600-Example.xlsx_JJS-MGP20.tsv", "OD600-Example.xlsx_JJS-MGP999.tsv", "OD600-Example.xlsx_MS.tsv", "OD600-Example.xlsx_WT 168 trp+.tsv" };
{ "OD600-Example.xlsx_JJS-MGP001.tsv", "OD600-Example.xlsx_JJS-MGP020.tsv",
"OD600-Example.xlsx_JJS-MGP100.tsv",
"OD600-Example.xlsx_JJS-MGP999.tsv", "OD600-Example.xlsx_MS.tsv",
"OD600-Example.xlsx_WT 168 trp+.tsv" };
assertEquals(Arrays.asList(expectedContents), Arrays.asList(contents));
File tsvSplitFile = new File(tsvSplitFolder, "OD600-Example.xlsx_JJS-MGP1.tsv");
File tsvSplitFile = new File(tsvSplitFolder, "OD600-Example.xlsx_JJS-MGP001.tsv");
checkTsvSplitContent(tsvSplitFile);
context.assertIsSatisfied();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment