-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I made changes to the regex pattern in 4 fields yesterday about 5pm, but from what I can the changes are only reflected in the checklist part of the schema/API from what I can see. This is grand, as it is the most important from the ENA mainstream user perspective, but it would be good to know if there is a problem? is data not being updated in all places or do I just need to be more patient as the updates trickle through? Thanks as ever.
the ^not applicable$ are in the checklists for the 4 for field_names(the were previously missing from) e.g. in ERC000022
These are the four fields_names that had their patterns updated yesterday.
"altitude", "depth", "elevation", "host_height",
curl -s '[https://wwwdev.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000022' | sed 's/\$//g' | jq -r '.properties.characteristics.properties | to_entries[]](https://wwwdev.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000022'%20|%20sed%20's//$//g'%20|%20jq%20-r%20'.properties.characteristics.properties%20|%20to_entries[])' | egrep -e '("key|"pattern)' | grep -B1 pattern | grep -1 "not applicable"
"key": "collection date",
"pattern": "(^[12][0-9]{3}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01])(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?(/[0-9]{4}(-[0-9]{2}(-[0-9]{2}(T[0-9]{2}:[0-9]{2}(:[0-9]{2})?Z?([+-][0-9]{1,2})?)?)?)?)?)|(^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing)"
"key": "altitude",
"pattern": "((0|((0\\.)|([1-9][0-9]*\\.?))[0-9]*)([Ee][+-]?[0-9]+)?)|((^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing))"
"key": "geographic location (latitude)",
"pattern": "(^[+-]?[0-9]+.?[0-9]{0,8})|(^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing)"
"key": "geographic location (longitude)",
"pattern": "(^[+-]?[0-9]+.?[0-9]{0,8})|(^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing)"
--
"key": "elevation",
"pattern": "([+-]?(0|((0\\.)|([1-9][0-9]*\\.?))[0-9]*)([Ee][+-]?[0-9]+)?)|((^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing))"
"key": "amount or size of sample collected",
--
"key": "depth",
"pattern": "((0|((0\\.)|([1-9][0-9]*\\.?))[0-9]*)([Ee][+-]?[0-9]+)?)|((^not applicable)|(^not collected)|(^not provided)|(^restricted access)|(^missing: control sample)|(^missing: sample group)|(^missing: synthetic construct)|(^missing: lab stock)|(^missing: third party data)|(^missing: data agreement established pre-2023)|(^missing: endangered species)|(^missing: human-identifiable)|(^missing))"
But not seeing the changes in another part of the API
The biosample schema has not reflected the change to the 4 terms yet in another part of the schema - following up with Isuru/Dipayan on this. The query below is trying to use the very latest version of the field too. (when I was playing with the API calls a month ago, the latest-true worked as expected)
woollard@JTJG77DMX2 owl % date
Thu 7 Aug 2025 08:22:11 BST
woollard@JTJG77DMX2 owl % curl -s 'https://www.ebi.ac.uk/biosamples/schema-store/api/v2/fields?size=1000&latest=true&page=0' | jq '._embedded.fields[]' | jq -s '.[] | select(has("pattern"))' | jq '[.name,.pattern]' | grep -A1 'altitude'
"altitude",
"((0|((0\\.)|([1-9][0-9]*\\.?))[0-9]*)([Ee][+-]?[0-9]+)?)|((^not collected$)|(^not provided$)|(^restricted access$)|(^missing: control sample$)|(^missing: sample group$)|(^missing: synthetic construct$)|(^missing: lab stock$)|(^missing: third party data$)|(^missing: data agreement established pre-2023$)|(^missing: endangered species$)|(^missing: human-identifiable$)|(^missing$))"
woollard@JTJG77DMX2 owl %