Skip to content

Commit 543c5cc

Browse files
authored
Merge pull request #611 from ISA-tools/table_headers_609
Changed tests to reflect changed table headers. #609
2 parents f4ad449 + 832ddaf commit 543c5cc

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

isatools/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"Acquisition Parameter Data File",
2424
"Metabolite Assignment File",
2525
"Metabolite Identification File",
26+
"Normalization Name"
2627
]
2728

2829
_LABELS_DATA_NODES = [

isatools/isatab/validate/rules/rules_40xx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ def load_table_checks(df, filename):
448448
"Hybridization Assay Name",
449449
"Array Design REF",
450450
"Scan Name",
451+
"Normalization Name",
451452
"Data Transformation Name",
452453
]
453454
and not _RX_PARAMETER_VALUE.match(col)

tests/convert/test_mzml2isa.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_mzml2isa_convert_investigation(self):
2424
os.path.join(self._mzml_data_dir, study_id + "-partial"), self._tmp_dir, study_id, validate_output=True
2525
)
2626
self.assertEqual(len(report["warnings"]), 8)
27-
self.assertEqual(len(report["errors"]), 3)
27+
self.assertEqual(len(report["errors"]), 2)
2828

2929
# Strip out the line with Comment[Created With Tool] to avoid changes in version number generated by mzml2isa
3030
with open(os.path.join(self._tmp_dir, "i_Investigation.txt")) as in_fp, StringIO() as stripped_actual_file:
@@ -45,7 +45,7 @@ def test_mzml2isa_convert_study_table(self):
4545
os.path.join(self._mzml_data_dir, study_id + "-partial"), self._tmp_dir, study_id, validate_output=True
4646
)
4747
self.assertEqual(len(report["warnings"]), 8)
48-
self.assertEqual(len(report["errors"]), 3)
48+
self.assertEqual(len(report["errors"]), 2)
4949
with open(os.path.join(self._tmp_dir, "s_{}.txt".format(study_id))) as out_fp:
5050
with open(
5151
os.path.join(self._tab_data_dir, study_id + "-partial", "s_{}.txt".format(study_id))
@@ -59,7 +59,7 @@ def test_mzml2isa_convert_assay_table(self):
5959
)
6060
self.assertTrue(report["validation_finished"])
6161
self.assertEqual(len(report["warnings"]), 8)
62-
self.assertEqual(len(report["errors"]), 3)
62+
self.assertEqual(len(report["errors"]), 2)
6363
with open(
6464
os.path.join(self._tmp_dir, "a_{}_metabolite_profiling_mass_spectrometry.txt".format(study_id))
6565
) as out_fp:

tests/isatab/validate/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def test_mtbls267(self):
2323
with open(path.join(data_path, "i_Investigation.txt"), "r") as data_file:
2424
r = validate(fp=data_file, config_dir=self.default_conf, origin="mzml2isa")
2525
print(r["warnings"])
26-
self.assertEqual(len(r["errors"]), 4)
26+
self.assertEqual(len(r["errors"]), 3)
2727

2828
def test_mtbls_1846(self):
2929
data_path = path.join(path.dirname(path.abspath(__file__)), "..", "..", "data", "mtbls", "MTBLS1846")
3030
with open(path.join(data_path, "i_Investigation.txt"), "r") as data_file:
3131
r = validate(fp=data_file, config_dir=self.default_conf)
32-
self.assertEqual(len(r["errors"]), 20)
32+
self.assertEqual(len(r["errors"]), 18)
3333

3434
def test_bii_i_1(self):
3535
data_path = path.join(path.dirname(path.abspath(__file__)), "..", "..", "data", "tab", "BII-I-1")

0 commit comments

Comments
 (0)