annotation_loader

module of dascore.core source

Read annotation sets from storage.

A set is either a directory holding an annotations table, optional attrs, a features table where the set has features, and bases.json where it has bases; or a bare annotations table whose dimensions the caller supplies. A directory of set directories loads as one set with a set column on both tables. Per-set dimensions, provenance, and documented columns remain under attrs.sets. Feature ids, and annotation ids where stated, are unique across the sets loaded together.

A table may declare dimensions in a # dims: distance, time comment above its header. Data directories may store annotations under .annotations. Columns beginning with an underscore are ignored.

CSV cells are typed before validation: dimension columns use the set’s reader, order columns are numbers, and reserved columns stay text. Table errors are exposed as annotation errors.

Functions

Name Description
annotations Load annotations from whatever holds them.
find_annotations Return what a directory of data carries its annotations under, or None.