Spool

class of dascore.core.spool
inherits from: NodeRepr, RichRepr, NamespaceOwner
source

Spool(
    data = None,
)

A container of patches: a view over a PatchCatalog.

Construct directly from in-memory patches, or with dascore.spool from patches, a directory of files, or a single file.

Parameters

Parameter Description
data A patch or sequence of patches this spool should hold, or
another spool, whose catalog and provenance the new spool shares
rather than copies; None creates an empty spool.
Note

The catalog is the spool’s entire state: live patches sit in its resolver registry, file-backed patches in its index tables, and restructured views (chunk/concat) are derived in-memory catalogs whose rows are the plan outputs. Selection, ordering, and windowing are lazy specs composed on the catalog; one engine serves every construction path.

Methods

Name Description
attach_inventory Attach a DASDAE inventory to this spool.
chunk Chunk the data in the spool along specified dimension.
chunk_plan Return the plan chunk would execute, without touching any data.
concatenate Concatenate patches in order along a dimension.
conform_to_inventory Return a spool the inventory describes exactly, patch for patch.
cut Return one lazy patch per feature of an annotation set.
enrich Enrich each patch this spool yields from an inventory.
expand_by Expand the spool into one patch per value of an inventory coordinate.
get_contents Get a dataframe of the spool contents.
get_coverage Return a dataframe summarizing how complete the spool is.
get_gaps Return a dataframe with one row per gap along a dimension.
get_patch_names Generates the default name of patch data.
iterate Yield patches in order while a background thread loads ahead.
load Read every patch into memory and return a spool holding them.
map Map a function of all the contents of the spool.
remove_inventory Return a spool carrying no inventory.
select Sub-select parts of the spool.
sort Sort the Spool based on a specific attribute.
split Yield sub-patches based on specified parameters.
stack_patches Stack (add) all patches compatible with first patch together.
unselect Return the spool without the patches a selection would keep.
update Updates the contents of the spool, return the updated spool.