Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#1605 closed enhancement (fixed)

Inherit annotations from a child path

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 3.1
Component: core Version:
Keywords: Cc:

Description

This may seem contradicting, but the use case is some like follows:

  1. Let's say we have the usual chain of biomaterial items. BioSource -> Sample -> Extract -> ... -> RawBioAssay.
  2. From the extract (E1) we make a child extract (E2) that we use for, for example, quality measurement. This is stored as an annotation on E2.
  3. We do now want to use this annotation as an experimental factor on the raw bioassay, but it is not possible since E2 is not a parent item.

Ok, in this case we could have stored the annotation on E1 instead of on E2, but lets say that we store what is remaining of E1 in a freezer and a year later we do another experiment with it. We need to redo the quality measurement since it may have changed during the storage time. So we create E3 as a child to E1 and annotate E3 with the new quality measurement. This time we can't store the annotation on E1 since it would conflict with the first measurement.

My current idea is that this should be be able to work if we had a flag on each item telling if annotations should be inherited up or down the path. Things to consider:

  • Is one flag that flips the direction enough or do we need flags that turn on/off each direction independently?
  • Should we have the flag(s) on the annotation set or on the items? If the flag(s) are on the annotation set the feature will be available on all annotatable items. I am not sure this makes sense but we could disable this feature on certain items programmatically since database-wise it makes sense to keep this information in a single place.

Change History (7)

comment:1 by Nicklas Nordborg, 13 years ago

Milestone: BASE 3.0BASE 3.1

comment:2 by Nicklas Nordborg, 12 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:3 by Nicklas Nordborg, 12 years ago

The idea we have now that the nice feature with item subtypes (#1597) has been implemented is to have the flag on the subtype instead of on each individual item. This will prevent mistakes from forgetting to set the flag on the items and makes it easier to set up the correct workflow with item subtypes.

comment:4 by Nicklas Nordborg, 12 years ago

(In [5983]) References #1605: Inherit annotations from a child path

Added support for this in the core layer and web gui. It has been implemented for biomaterial and physical bioassay items so far. Need to add functionality to the 'Item overview' to follow the path when going up.

comment:5 by Nicklas Nordborg, 12 years ago

(In [5985]) References #1605: Inherit annotations from a child path

Implemented support in the "Item overview" functionality for biomaterial items and physical bioassays. Each loader implementation need to handle this case in the loadReverseChildNodes() method which should create PROPERTY-type nodes for the child items that have an item subtype with the pushAnnotations flag set. The downwards path of that branch will then be followed even though the main direction is going upwards.

comment:6 by Nicklas Nordborg, 12 years ago

Resolution: fixed
Status: assignedclosed

comment:7 by Nicklas Nordborg, 12 years ago

(In [6000]) References #1605: Inherit annotations from a child path

Fixed incorrect extract name in test program.

Note: See TracTickets for help on using tickets.