airr-community / airr-standards

AIRR Community Data Standards
https://docs.airr-community.org
Creative Commons Attribution 4.0 International
35 stars 23 forks source link

How to represent range for collection_time_point_relative #646

Closed kira-neller closed 4 months ago

kira-neller commented 1 year ago

With v1.4 of the AIRR Standards, we now represent timepoint collection like so: collection_time_point_relative (number) collection_time_point_relative_unit (ontology) collection_time_point_reference (string)

This works fine for something with a discrete collection timepoint, e.g. "2 days post-vaccination".

We have a study that has a timepoint collection range for two groups (early and late COVID recovery). Early samples were taken less than 7 days after the first negative COVID-19 test, while late samples were taken more than 14 days after the first negative COVID-19 test. Currently, we're representing this like: collection_time_point_relative = 7 collection_time_point_relative_unit = day collection_time_point_reference = Less than N days after first negative COVID-19 test

Should we consider introducing a collection_time_point_relative_min and collection_time_point_relative_max to handle cases such as these?

Thanks! Kira

bussec commented 1 year ago

My 2 cents: If you think that this would address a relevant fractions of studies that we could currently not accurately annotate, we should discuss adding these properties. However, we should ensure that we do not end up with 40+ cellection_time_* properties, if we are already aware that the appropriate step would be to adopt a more comprehensive annotation standard (I don't have anything in mind, but I am sure that people have tried to address the problem before).

schristley commented 1 year ago

Can take a general approach as suggested in #551 so any physical quantity field can either be a point value or an interval.

bcorrie commented 1 year ago

Yes, I think for v2.0 we should look to the #551 approach and have an "Interval" capability for numeric fields when we think that is appropriate.

kira-neller commented 1 year ago

Thanks all - we can probably close this issue then if there is a plan already in the works.

bcorrie commented 5 months ago

Revisiting this. collection_time_point_relative is now a TimePoint. Should we make it a TimeInterval?

This does solve the problem if we use TimeInterval as an open interval. For one study arm it would be min = 0, max = 7 and for the other min = 14, max = null?

For most cases we would have min = max indicating it was a single TimePoint.

bcorrie commented 5 months ago

Question to answer - Is this an acceptable collection_time_point_relative description of the use case? We can do this now:

collection_time_point_relative.value = 7
collection_time_point_relative.unit = day
collection_time_point_relative.label = Less than N days after first negative COVID-19 test

collection_time_point_relative.value = 14
collection_time_point_relative.unit = day
collection_time_point_relative.label = More than N days after first negative COVID-19 test