Gemma icon indicating copy to clipboard operation
Gemma copied to clipboard

FactorValueValue objects are not fully populated for experimentalFactors for getDatasetDifferentialExpressionAnalyses endpoint

Open oganm opened this issue 1 year ago • 7 comments

According to the API specification, getDatasetDifferentialExpressionAnalyses endpoint is supposed to return ExperimentalFactorValueObjects as values of experimentalFactors of the returned resultSets

However an actual call to the endpoint would show that the output is missing experimentalFactorId and experimentalFactorCategory fields. I assume this was removed since these fields are redundant with the parent but not having such changes reflected in the specification causes invisible failures on occasion

oganm avatar Aug 08 '24 01:08 oganm

I'll add a flag to trigger the old behavior. In general, when a ExperimentalFactor is rendered, I omit the EF inside its FVs because that is redundant.

arteymix avatar Aug 08 '24 17:08 arteymix

Pushed a fix to the packages to work with this form but is there anything we can do so the specification matches what is actually going on?

oganm avatar Aug 08 '24 18:08 oganm

Unless indicated by a required property in the JSON schema, no fields are guaranteed to be present. I think I will consider adding a few required fields to the spec.

arteymix avatar Aug 08 '24 23:08 arteymix

I can restore the fields, but mark them as deprecated in the context of an EFVO.

arteymix avatar Aug 08 '24 23:08 arteymix

gemmapy and gemma.R currently work without those specific fields. but it's good to have the specification give a heads up when things vanish.

oh can you do context specific deprecations?

oganm avatar Aug 08 '24 23:08 oganm

Hmm, not really because the models are shared. I can document individual fields though.

arteymix avatar Aug 09 '24 17:08 arteymix

ah, just something akin to "pst i just removed this bit in this context" would be enough

oganm avatar Aug 09 '24 21:08 oganm