isa-api icon indicating copy to clipboard operation
isa-api copied to clipboard

ISA-JSON validation error for JSON from createSimpleJSON documentation

Open Hannah-Doerpholz opened this issue 1 year ago • 2 comments

I have installed the isa-api for the first time and tried to create a sample ISA.json file using your documentation (https://isatools.readthedocs.io/en/latest/example-createSimpleISAJSON.html). Then I tried to validate the created file accordingly:

from isatools import isajson my_json_report = isajson.validate(open('isa.json'))

For this, I receive two errors:

2022-11-28 15:07:28,225 [ERROR]: isajson.py(check_characteristic_category_ids_usage:844) >> (E) There are characteristic categories ['#d88b6d5e-0187-4c4a-ae6b-6efc40dd2279'] used in a source or sample characteristic that have not been not declared

and

2022-11-28 15:07:28,227 [ERROR]: isajson.py(check_measurement_technology_types:1254) >> (E) Could not load configuration for measurement type 'gene sequencing' and technology type 'nucleotide sequencing'

According to my findings, the characteristicCategories for the samples are indeed missing in both the study section and in the assay section of the JSON file. Maybe you should add them in the example source code in the documentation.

To investigate the second error, I downloaded the MTBLS1 experiment as described by you (https://isatools.readthedocs.io/en/latest/importdata.html) in the JSON format. This file passes the validation. In the assay section, the "measurementType" (annotationValue : metabolite profiling) and the "technologyType" (annotationValue : NMR spectroscopy) don't produce this error. When I copy both annotationValues to the first example JSON (the one producing the error), the file suddenly passes validation. I think the problem might be with the configuration file (isaconfig_v2015_07_02.json) as the error states which I have found to describe two graphs that detail these two measurement and technology types. Where does this configuration file come from and do I need a specific new configuration file for any ISA-json file I want to validate? Or is something else the problem?

OS: Ubuntu 20.04 isatools: 0.12.2 python: 3.9.12

Hannah-Doerpholz avatar Nov 28 '22 14:11 Hannah-Doerpholz

Hello @Hannah-Doerpholz Our documentation is unfortunatly not up to date. We have prepared (and are currently reviewing) jupyter notebooks to help users navigate the ISA API. They will come bundled with the upcoming release. I suggest looking at https://github.com/ISA-tools/isa-api/blob/master/isa-cookbook/content/notebooks/isa-api-programmatic-rebuild-of-BII-S-3.ipynb in the meantime.

terazus avatar Dec 01 '22 15:12 terazus

Hi, is there an update recommendation to create an example ISA-JSON that passes validation?

b-brankovics avatar Feb 27 '24 14:02 b-brankovics