Developer

Custom Data Types

Last updated on 14-Oct-2018 by fnl

Fermentation Entities

For fermentation data registration, a more developed data model is desirable as variables such as plasmid ID and growth conditions are important and these are not covered by the default entities in Scifeon.

The fermentation app expands existing entities to accommodate the wanted data structures.

Custom Attributes

The new variables, such as growth condition, are made as template objects in a json file.

The above object defines a new field on the CellClone class. The field describes the growth conditions of the cellclone and should be a string (text) element.

Note that no new rows are made in the actual database. Instead, the data is saved as a json string in the "attributes" row.

Bootstrapping the Elements

To make sure the new elements are initialized every time Scifeon is run, a bootstrapper plugin is written.

The bootstrapper plugin requires a bootstrapper decorator.

The type property establishes the script as a bootstrapper and makes sure the script is run whenever Scifeon is.

The bootstrapper also allows us to directly edit the attributes in Scifeon using the field editor.

Each attribute is parsed from the json file to individual columns of the entity. These can then be edited in the field editor or searched for in the database browser.