-
Notifications
You must be signed in to change notification settings - Fork 1
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
JgiMg and JgiMt: Add rule that requires a dna_cont_well when the dna_cont_type is "plate" #59
Labels
Comments
turbomam
changed the title
JgiMg and JgiMt: Add rule that requires a well position when the container is a plate
JgiMg and JgiMt: Add rule that requires a dna_cont_well when the dna_cont_type is "plate"
Mar 24, 2023
Biosample:
rules:
- description: Samples in tubes can't have a plate position.
But plate_position currently does have to be asserted as an empty string.
Can't be null, None, un-asserted,etc.
Had wanted to use value_present, but that may not be implemented in the linkml-runtime yet.
preconditions:
slot_conditions:
dna_cont_type:
equals_string: tube
postconditions:
slot_conditions:
dna_cont_well:
none_of:
pattern: ".+"
- description: Samples in plates must have a plate position that matches the regex. Note the requirement for an empty string in the tube case. Waiting for value_present validation to be added to runtime
preconditions:
slot_conditions:
dna_cont_type:
equals_string: plate
postconditions:
slot_conditions:
dna_cont_well:
pattern: ^(?!A1|A12|H1|H12)(([A-H][1-9])|([A-H]1[0-2]))$ |
try a simpler rule first?
|
JgiMgInterface:
rules:
- preconditions:
slot_conditions:
dna_cont_type:
equals_string: plate
postconditions:
slot_conditions:
dna_volume:
maximum_value: 1
- preconditions:
slot_conditions:
dna_cont_type:
equals_string: tube
postconditions:
slot_conditions:
dna_volume:
minimum_value: 1 |
[{"preconditions":{"slot_conditions":{"dna_cont_type":{"equals_string":"plate"}}},"postconditions":{"slot_conditions":{"dna_volume":{"maximum_value":1}}}},{"preconditions":{"slot_conditions":{"dna_cont_type":{"equals_string":"tube"}}},"postconditions":{"slot_conditions":{"dna_volume":{"minimum_value":1}}}}] |
yq -i '(.classes.[] | select(.name == "JgiMgInterface") | .rules) = [{"preconditions":{"slot_conditions":{"dna_cont_type":{"equals_string":"plate"}}},"postconditions":{"slot_conditions":{"dna_volume":{"maximum_value":1}}}},{"preconditions":{"slot_conditions":{"dna_cont_type":{"equals_string":"tube"}}},"postconditions":{"slot_conditions":{"dna_volume":{"minimum_value":1}}}}]' local/with_modifications.yaml |
@pkalita-lbl will be working on the emission of rules by gen-jsonschema |
Duplicate microbiomedata/nmdc-schema#1433 Closing in favor of the issue that includes DNA/RNA plate and other slot dependancies. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But not vice versa
The text was updated successfully, but these errors were encountered: