CHESSCore API Reference

CHESSCore is the in-memory "lab engine": the Location, Stock, Attribute, and Read types and the operations that act on them. It has no database dependency. The reference is split by topic:

  • Locations & Operations: building locations, moving them, occupancy, locking and activity, transfers between wells, and instrument capability.
  • Stocks: reagents, chemicals, organisms, stocks, and CHESS's extra units.
  • Solution Chemistry: molar composition, pH, and acid/base equilibria.
  • Attributes & Reads: environmental attributes, inheritance, and instrument reads.
  • Interop: table and JSON conversion of stocks and locations.

The entry points most code starts from are build_location, move_into!, deposit!, transfer!, set_attribute!, and record_read!.

This page lists the error types CHESSCore throws and register_lab, which registers a lab's constants module. The Troubleshooting page explains the most common errors.

CHESSCore.register_lab — Method
register_lab(lab_module::Module)

Makes CHESSCore aware of lab objects defined in a new lab module and allows the string macros @spc_str and @org_str to work with the objects. When defining new lab objects, make sure to call register_lab.

Example:

# in a custom module
module MyLab
using CHESSCore

function __init__()
    ...
    CHESSCore.register_lab(MyLab)
    ...
end
end #module
source
CHESSCore.AmbiguousOccupancyRuleError — Type
AmbiguousOccupancyRuleError(parent_kind,child_kind,matches)

More than one category-based occupancy rule matches parent_kind/child_kind with no exact-kind rule to break the tie. Add an explicit exact-kind rule to resolve the ambiguity.

source
CHESSCore.UncommittedLocationError — Type
UncommittedLocationError(loc)

An uncommitted Location (no location_id) was passed to a function that requires the location to already be tracked in the database.

source