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

Replace `Sample.collection_time_point*` properties with `TimePoint` object #689

Closed bussec closed 5 months ago

bussec commented 1 year ago

The TimePoint object is currently only used once in the schema (as part of RepertoireGroup). As this is semantically identical to the separate collection_time_point* properties of the Sample object, it should be replaced with the following mapping:

jday1 commented 1 year ago

Quick question on this one. Are you suggesting deprecating TimePoint or Sample.collection_time_point...?

If one is deprecating Sample.collection_time_point..., this is problematic because a single Repertoire object can contain multiple samples. A typical use case for this is to store samples from a repertoire at multiple points in time.

If Sample.collection_time_point... is deprecated in favour of TimePoint, then this functionality is lost. In this case, the change would be a breaking one. If this is implemented, then this implicitly creates an AIRR standard that samples from the same subject at different time points should be stored as separate Repertoire objects. Is this intended?

Would it then be worth enforcing 'one sample per repertorie' which is the iReceptor standard and modify Sample from an array to a single object?

scharch commented 1 year ago

If Sample.collection_time_point... is deprecated in favour of TimePoint, then this functionality is lost. In this case, the change would be a breaking one. If this is implemented, then this implicitly creates an AIRR standard that samples from the same subject at different time points should be stored as separate Repertoire objects. Is this intended?

This is currently the expectation, I believe, although the docs don't reflect it. RepertoireGroup is intended for the use case you describe.

bcorrie commented 7 months ago

In re-visiting this in #735 I think we are more talking about deprecating:

But adding:

So we would have:

So no loss of functionality - we are just formalizing that collection_time_point is a TimePoint.

In #735 we are going a bit further than this and talking about creating a generic Event object and in this case we would likely use an Event of type SampleCollection or something along those lines.

bcorrie commented 5 months ago

This is done...