Skip to content

Commit

Permalink
adding field Performer, associated test
Browse files Browse the repository at this point in the history
  • Loading branch information
proccaserra committed Apr 12, 2023
1 parent 2d0ddb3 commit 27c5797
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The *ISA API* aims to provide you, the developer, with a set of tools to help y
----
### Read the Publication...

Read our **open access [publication](https://doi.org/10.1093/gigascience/giab060) "SA API: An open platform for interoperable life science experimental metadata", published in GigaScience** as a `technical note`
Read our **open access [publication](https://doi.org/10.1093/gigascience/giab060) "ISA API: An open platform for interoperable life science experimental metadata", published in GigaScience** as a `technical note`

*David Johnson, Dominique Batista, Keeva Cochrane, Robert P. Davey, Anthony Etuk, Alejandra Gonzalez-Beltran, Kenneth Haug, Massimiliano Izzo, Martin Larralde, Thomas N. Lawson, Alice Minotto, Pablo Moreno, Venkata Chandrasekhar Nainala, Claire O'Donovan, Luca Pireddu, Pierrick Roger, Felix Shaw, Christoph Steinbeck, Ralf J. M. Weber, Susanna-Assunta Sansone, Philippe Rocca-Serra.
ISA API: An open platform for interoperable life science experimental metadata. 2020.11.13.382119; doi:
Expand Down
3 changes: 2 additions & 1 deletion isatools/isatab/load/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
)


def load(isatab_path_or_ifile, skip_load_tables=False):
def load(isatab_path_or_ifile: object, skip_load_tables: object = False) -> object:
"""Load an ISA-Tab into ISA Data Model objects
:rtype: object
:param isatab_path_or_ifile: Full path to an ISA-Tab directory or file-like
buffer object pointing to an investigation file
:param skip_load_tables: Whether or not to skip loading the table files
Expand Down
2 changes: 1 addition & 1 deletion isatools/isatab/validate/rules/rules_40xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def load_table_checks(df, filename):
'Data Transformation Name',
'Derived Spectral Data File', 'Normalization Name',
'Derived Array Data File', 'Image File', "Free Induction Decay Data File",
'Metabolite Assignment File', "Date", "Array Data Matrix File",
'Metabolite Assignment File', "Performer", "Date", "Array Data Matrix File",
'Free Induction Decay File', "Derived Array Data Matrix File",
'Acquisition Parameter Data File']) \
and not _RX_CHARACTERISTICS.match(column) \
Expand Down
13 changes: 13 additions & 0 deletions tests/validators/test_validate_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,16 @@ def test_validate_testdata_treatment_sequence_json(self):
validator = Draft4Validator(treatment_sequence_schema,
resolver=resolver)
validator.validate(json.load(test_case_fp))


class TestPerformerValidation(unittest.TestCase):
def test_ptx(self):
filepath = os.path.join(utils.TAB_DATA_DIR, 'TEST-PTX', 'i_investigation.txt')
with open(filepath) as fp:
investigation = isatab.load(fp)
print(investigation.title)
report = isatab.validate(fp)
print(report["errors"])

# self.assertTrue(len(report["errors"]) == 0)
# self.assertEqual(len(report["errors"]), 0)

0 comments on commit 27c5797

Please sign in to comment.