Biomaterial

NOTE! This document is outdated and has been replaced with newer documentation. See The database schema and the Data Layer API

This document covers the details of the biomaterials part of BASE.

See also

Last updated: $Date: 2009-04-06 14:52:39 +0200 (må, 06 apr 2009) $


BioMaterials

There are four types of biomaterials. BioSourceData [API], SampleData [API], ExtractData [API] and LabeledExtractData [API],

All four types of biomaterials are derived from the base class BioMaterialData [API]. The reason for this is that they all share common functionality such as pooling and events. By using a common base class we do not have to create duplicate classes for events, such as SampleEventData.

The BioSourceData is the simplest of the biomaterial. It cannot have parents and can't participate in events. It's only used as a (non-required) parent for samples.

The MeasuredBioMaterialData [API] class is used as a base class for the other three biomaterial types. It introduces quantity measurements and can store original and remaining quantities. They are both optional. If an original quantity has been specified the core automatically calculates the remaining quantity based on the events a biomaterial participates in.

All measured biomaterial have at least one event associated with them, the creation event, which holds information about the creation of the biomaterial. A measured biomaterial can be created in three ways:

In the first case the pooled property of the MeasuredBioMaterialData class is false and the parent is specified in the parent property. If the parent is not a BioSourceData this information is duplicated, with the addition of an optional used quantity value, in the sources collection of the BioMaterialEventData object representing the creation event. It is the responsibility of the core to make sure that everything is properly synchronized and that remaining quantities are calculated.

In the second case the pooled property is true and the parent property is null. All source biomaterials are contained in the sources collection. Again, optionally providing information about used quantities.

The third case is just a special case which has neither a parent nor any sources.

Events

An event represents something that happened to one or more biomaterials, for example the creation of another biomaterial. The BioMaterialEventData [API] holds information about entry and event dates, protocols used, the user who is responsible, etc.

There are three types of events:

TypeDescription
1 Creation event: This event represents the creation of a (measured) biomaterial. The sources collection contains information about the biomaterials that were used to create the new biomaterial. If the biomaterial is a pooled biomaterial all sources must be of the same type. Otherwise there can only be one source of the parent type. These rules are maintained by the core.
2 Hybridization event: This event represents the creation of a hybridization. This event type is needed because we want to keep track of quantities for labeled extracts. This event has a hybridization as a product instead of a biomaterial. The sources collection can only contain labeled extracts.
3 Other event: This event represents some other important information about a single biomaterial that affected the remaining quantity. This event type doesn't have any sources.