-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] BEP031: Microscopy #1359
[ENH] BEP031: Microscopy #1359
Conversation
…IsMicroscopy called by IsBids in type.js
…d modified json.js to call it
…le 'checkSamples.js' to check if the samples files are in the dataset. WIP; checkSamples considers for now that those files are always needed. Need to add the regex to find the sample entity. Modified 'fulLTest.js' to call 'checkSamples.js'.
…ended JSON field respectively.
…tsv is there (already coded).
…ght not need this file, WIP. In 'microscopy.json', removed the recommended fields from the 'required' dict.
… 'samples.tsv'. checkSamples deleted and its call in fullTest.js as well.
…e files 'fullTest.js', 'tsv.js' and 'validate.js'. I will work on something else and come back later on it.
… implemented yet for the other modalities.
Co-authored-by: mariehbourget <[email protected]>
Co-authored-by: mariehbourget <[email protected]>
…rules to suit that.
…me.js'. The file is called in the fullTest only if the dataset has for modality 'Microscopy'.
…the related errors in the 'list.js' file.
…g error code: 55 where a JSON field's value is not equal to one of the allowed values, so the code 221 is deleted.
…o manage the JSON name rules separately. Modified 'type.js' to import this new dictionary. Put the <sample> entity optional at the session and top level.
…ds 'Immersion', 'NumericalAperture', 'Magnification', 'ChunkTransformationMatrix' and 'ChunkTransformationMatrixAxis'.
Codecov Report
@@ Coverage Diff @@
## master #1359 +/- ##
==========================================
- Coverage 84.83% 84.10% -0.73%
==========================================
Files 83 90 +7
Lines 3356 3631 +275
Branches 1011 1098 +87
==========================================
+ Hits 2847 3054 +207
- Misses 430 483 +53
- Partials 79 94 +15
Continue to review full report at Codecov.
|
Resolve PR comments
2. Add validation for inconsistent tiff type and extension
Validation for Tiff and BigTiff
Hi @bids-standard/maintainers, Note: The ExifReader package that we use to read the XML header in OME-TIFF files seems to support only "regular TIFF" files and not "BigTIFF" files. So in cases where the files are "BigTIFF", the consistency checks between the OME metadata and the JSON metadata is skipped with a warning to the user. Thanks to @etiennebergeron and @konantian for their help with the validator implementation! 🚀 |
Update validation for OME namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one comment in, in readOEMFile, thoughts on potential memory issues, doesn't necessarily have to be fixed at this time but I wanted to see if any had any opinons/thoughts on it.
Other than that any issues are addressed in this PR:
neuropoly#7
Bep031 review updates
This PR aims to incorporate Microscopy to the bids-validator (BEP031, @mariehbourget, @jcohenadad)
We have encountered some issues with the schema and with an external library and would appreciate some feedback and guidance before we continue.
Questions about schema
We had a working version of the microscopy validator in commit 5d0a27e before we merged recent changes from master (commit f2588ed). If we understand correctly, the bids-validator now uses the
yaml
files from the schema to validate the datasets. We will make the appropriate changes related to that in order to have a working version again but we have some questions first:yaml
schema files mandatory or should we still be able to run it like the previous version?yaml
files, are those files duplicated from thebids-specification/src/schema
?Note: Some
yaml
files were not included for Microscopy in bids-spec to facilitate community review. If we have to add them to bids-validator, I would like to add them as well in bids-spec for consistency.Questions about external libraries
For microscopy, we need to read metadata from the XML header of OME-TIFF files. We are able to do that via the
exifreader
,esm
andxml2js
libraries.However, when installing
exifreader
withnpm
, the node_modulebids-validator
is automatically uninstalled.We think we might not do the installation correctly or there might be a security issue with
xmldom
(a dependance ofexifreader
). Runningnpm audit
gives us this message:As we are not very experienced with javascript, we would need help with integrating and installing external librairies with the bids-validator. Thank you in advance!