PavlidisLab / Gemma

Genomics data re-analysis
Apache License 2.0
22 stars 6 forks source link

FactorValueValue objects are not fully populated for experimentalFactors for getDatasetDifferentialExpressionAnalyses endpoint #1201

Open oganm opened 1 month ago

oganm commented 1 month ago

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

arteymix commented 1 month ago

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.

oganm commented 1 month ago

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?

arteymix commented 1 month ago

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 commented 1 month ago

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

oganm commented 1 month ago

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?

arteymix commented 1 month ago

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

oganm commented 1 month ago

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