Opened 23 months ago

Closed 22 months ago

Last modified 20 months ago

#1072 closed Request (fixed)

Introduce Lysate item between RNA and Specimen

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Relax v1.4
Component: net.sf.basedb.relax Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

The existing structure has a direct link between RNA and Specimen. We want to break up this link and insert a Lysate item between them.

For a given RNA it easy to get the name for the Lysate (simply by getting rid of the '.r' at the end), create a new Lysate item and re-link the everything. We should also move the annotations starting with Lys or Partition on the RNA to the Lysate item.

There are some things that require careful handling:

  • There may be more than one RNA for a given Lysate. Before creating a new Lysate we must check that it doesn't exists already.
  • Access permissions must be correctly set and merged. If only a single RNA exists, the permissions can be copied to the Lysate. If there are more RNA item, the permissions must be merged so that the Lysate is accessible in all projects/releases.
  • The LysBatchNo and PartitionBatchNo annotations have project-specific values. They must all be copied correctly to the Lysate item.

Change History (11)

comment:1 Changed 23 months ago by Nicklas Nordborg

Owner: set to Nicklas Nordborg
Status: newassigned

comment:2 Changed 23 months ago by Nicklas Nordborg

Description: modified (diff)

comment:3 Changed 23 months ago by Nicklas Nordborg

(In [5077]) References #1072: Introduce Lysate item between RNA and Specimen

Added Lysate to the installation wizard.

comment:4 Changed 23 months ago by Nicklas Nordborg

(In [5078]) References #1072: Introduce Lysate item between RNA and Specimen

The installation wizard now checks if there are any RNA items with links to Specimen items. If so, a message is displayed with a link to create Lysates.

comment:5 Changed 23 months ago by Nicklas Nordborg

(In [5079]) References #1072: Introduce Lysate item between RNA and Specimen

The first step is to create a "Lysate" annotation type category and move some annotation types from the RNA category to it.

comment:6 Changed 23 months ago by Nicklas Nordborg

(In [5080]) References #1072: Introduce Lysate item between RNA and Specimen

Implemented the step that creates new lysate items and re-link the rna. Since a single Lysate may have more than one RNA item, special handling is required to make sure that permissions are merged correctly.

comment:7 Changed 23 months ago by Nicklas Nordborg

(In [5081]) References #1072: Introduce Lysate item between RNA and Specimen

Implemented support for moving annotations from the RNA to the Lysate. SO far, only regular (not project-specific) annotations are supported.

If there is more than one RNA for the same Lysate there is an issue with the annotations being different (should not happen unless they have been manually changed). This case currently throws an exception. It need to be handled better in the future.

comment:8 Changed 23 months ago by Nicklas Nordborg

(In [5085]) References #1072: Introduce Lysate item between RNA and Specimen

Added support for project-specific annotations. In theory this can create a complicated situation where default annotation values are actually used for different projects and merging them to the lysate would require a lot of checks.

However... after checking the actual data on our production server it was discovered that there is only one occurence of a pair of RNA items that has the same lysate. They both have the same values for all annotations so they should be easy to move to the lysate. So, there is no need to implement the complicated code. Instead, we simply throw an exception if we find two related RNA items with different values for annotations that should be moved to the lysate.

comment:9 Changed 23 months ago by Nicklas Nordborg

(In [5086]) References #1072: Introduce Lysate item between RNA and Specimen

Changed the process to use batches of 500 RNA items at a time. This should prevent a very long wait at the end (while Hibernate is executing a lot of SQL) and reduces the memory usage.

Since the update only considers RNA items linked to specimen, it will be possble to restart from the latest batch if there is a crash.

comment:10 Changed 22 months ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

comment:11 Changed 20 months ago by Nicklas Nordborg

(In [5240]) References #1072: Introduce Lysate item between RNA and Specimen

Fixes a problem with moving annotations from the RNA to the Lysate items. The "Lysate" annotation type category is created by the installation wizard (due to #1090 [5177]) before entering this fix which caused that no annotations types was selected for moving.

Note: See TracTickets for help on using tickets.