Mirrors Julia's Contract |> Contract. left is treated as the
earlier stage (upstream) and right as the later stage
(downstream); expectations and element types are resolved
accordingly and descriptions must match for overlapping axes /
properties.
Arguments
- left, right
Two
Contract()objects to merge.
Value
A new Contract() combining left and right.
Examples
upstream <- Contract(
axes = list(cell = list(RequiredInput, "per-cell axis")),
data = list(contract_vector("cell", "donor",
RequiredInput, "character", "donor id"))
)
downstream <- Contract(
axes = list(cell = list(RequiredInput, "per-cell axis")),
data = list(contract_vector("cell", "score",
CreatedOutput, "numeric", "computed score"))
)
merged <- merge_contracts(upstream, downstream)
length(merged@data)
#> [1] 2