IHEC / ihec-ecosystems

This repo is for code and documentation associated with the ihec-ecosystems working group
Apache License 2.0
5 stars 6 forks source link

ChIP-Input experiments not validating #49

Closed sitag closed 4 years ago

sitag commented 5 years ago

As per https://github.com/IHEC/ihec-ecosystems/blob/master/docs/metadata/1.0/Ihec_metadata_specification.md , things like

<EXPERIMENT_ATTRIBUTE><TAG>CHIP_PROTOCOL</TAG><VALUE></VALUE></EXPERIMENT_ATTRIBUTE>

should validate. But when we parse this xml, the json gets None for "chip_protocol" and this fails against https://github.com/IHEC/ihec-ecosystems/blob/master/schemas/json/experiment.json#L135 as it is not a string.

sitag commented 5 years ago

@juettemann you might need to keep this in mind.

dzerbino commented 5 years ago

Hello @sitag,

I'm not sure I agree with your reading of the spec. It says: CHIP_PROTOCOL - The ChIP protocol used, or 'Input'..

As I understand it, the XML example you provided should not validate.

Cheers,

Daniel

sitag commented 5 years ago

@dzerbino Sorry, I meant nullable attributes like "CHIP_ANTIBODY"

dzerbino commented 5 years ago

OK, here's one possible solution: each time a property is of type "string" without any constraints (e.g. enum, regex etc), then we replace "string" with ["string","null"]

sitag commented 5 years ago

@dzerbino There was some discussion (with @dbujold ) about supporting lists for attributes and not strings, in which case a NA value is an empty list (?) ..are we moving forward with lists or staying with strings?

dzerbino commented 5 years ago

Hello @sitag,

That's a good point:

Cheers,

Daniel

sitag commented 4 years ago

submitted ["string", "null"] fix. https://github.com/IHEC/ihec-ecosystems/pull/60/commits/15bf5ec2e39d41423894ea19e913ae6c77afb44f

dzerbino commented 4 years ago

Can we close then?

sitag commented 4 years ago

sure ...assuming it looks good to you