Opened 15 years ago

Closed 15 years ago

#1454 closed defect (fixed)

Pooled biomaterials doesn't return all annotatable parents

Reported by: Johan Vallon-Christersson Owned by: everyone
Priority: minor Milestone: BASE 2.15
Component: core Version:
Keywords: Cc:

Description

An item should be able to inherit annotations from it's parent items. However, in a user case, parent items that are pooled does not show up as parents with annotation. The user case involves the following chain of Items: SampleA(Annotated) -> Child Sample 1 -> Child Sample 2 -> Extract -> Labeled extract -> Hybridization -> Scan -> Rawbioassay. That is, child sample 1 is pooled from annotated SampleA. Child sample 2 is, in turn, pooled from child sample 1. From Child sample 2 there is an extract that is labeled and hybridized and further down the chain there is a rawbioassay that is used in an experiment. The annotation on SampleA is used as an experimental factor. However, in the user case the rawbioassay cannot inherit the annotation from SampleA. I expected that the rawbioassay should be able to inherit annotations from all annotated parents including SampleA.

Attachments (1)

Picture 9.png (29.4 KB ) - added by Johan Vallon-Christersson 15 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Nicklas Nordborg, 15 years ago

It works for me. I checked on each step and the Sample A is turning up as a parent for all items in the chain. Make sure that the value for "Array index" on the raw bioassay is the same as the "Array index" for the labeled extract on the hybridization. This is needed to make sure that the correct biomaterials are linked as parents.

in reply to:  1 comment:2 by Johan Vallon-Christersson, 15 years ago

Replying to nicklas:

It works for me. I checked on each step and the Sample A is turning up as a parent for all items in the chain. Make sure that the value for "Array index" on the raw bioassay is the same as the "Array index" for the labeled extract on the hybridization.

I've checked and the array index is correct. I did find something that looked strange. There seems to be some confusion for our BASE installation and my particular chain of items. Parent that appeared and was selected for inheriting annotations was moments later flagged as not being a parent item (see picture 9). Could this be a consequence of caching or is it expected behavior? The specific case involves a chain of parent-child items that were first created individually and later (after all items were created) joined in a parent-child event chain. Perhaps this is also an explanation for the behavior described in ticket#1453? It should be noted that the parent item was annotated after the entire parent-child chain was established.

by Johan Vallon-Christersson, 15 years ago

Attachment: Picture 9.png added

comment:3 by Nicklas Nordborg, 15 years ago

Do you think that you can produce a step-by-step procedure that reproduces the problem? Is the parent still flagged as "Not a parent"? When exactly did it appear as a parent? In the first post you say that you couldn't inherit annotations at all... and in the second comment that it was possible but then you got the "Not a parent" warning.

comment:4 by Nicklas Nordborg, 15 years ago

Component: webcore
Milestone: BASE 2.15
Priority: majorminor
Summary: Can an item inherit annotations from any of it's parent items?Pooled biomaterials doesn't return all annotatable parents

I think we have found a reasonable explanation for this problem. It requires a quite complex setup to reproduce. I think the following is needed:

  1. Log in as user A. Activate a project (P).
  2. Create a root sample (Sr) and then a pooled sample (Sp) with the Sr as the parent.
  3. Annotate the Sr with an annotation.
  4. Let Sp inherit the annotation from Sr.
  5. Log in as a user with administrative privileges. The important thing here is that the user can access both Sr and Sp without having to activate project P.
  6. Go to Sp, click "Edit" and go to the "Inherit annotations" tab.
  7. The Sr should be listed with an icon indicating "Not a parent item".
  8. Uncheck the checkbox to stop inheriting the annotation.
  9. Save and then open the same dialog again. The message "There are no parent items with annotations" should be displayed.
  10. Active project P.
  11. Open the "Inherit annotations" dialog again. Sr should now appear as a parent.

There is a similar behavior for pooled extracts and pooled labeled extracts.

comment:5 by Nicklas Nordborg, 15 years ago

The cause of this problem is an incorrect implementation of the getAnnotatableParents() method in Sample/Extract/LabeledExtract when the item in question is a pooled item. The code uses a query, but only with the default settings to include item "owned by me" and "in current project". Since the second user is not the owner of Sr or Sp and no project is active, the method fails to load the parent item. The fix is to set Include.ALL for the query that is used.

Note! It may probably be a good idea to check other implementations of getAnnotatableParents() for similar problems.

comment:6 by Nicklas Nordborg, 15 years ago

Resolution: fixed
Status: newclosed

(In [5279]) Fixes #1454: Pooled biomaterials doesn't return all annotatable parents

Also fixed other queries to use Include.ALL instead of a long list of options.

Note: See TracTickets for help on using tickets.