Roboliq's top module with functions for processing protocols.
- Source:
Methods
-
<inner> _run(opts [, userProtocol])
-
Process the protocol(s) given by the command line options and an optional userProtocol passed in separately to the API (currently this is just for testing).
Parameters:
Name Type Argument Description optsobject command line arguments as processed by nomnom.
userProtocolProtocol <optional>
an optional protocol that can be directly passed into the function rather than supplied via argv; currently this is only for testing purposes.
- Source:
Returns:
Processing results with properties
output(the final processed protocol) andprotocol(same as output, but without tables).- Type
- object
-
<inner> createStateItems(name, o, stateList)
-
This function recurively iterates through all objects, and for each object whose type has an entry in protocol.objectToPredicateConverters, it generates the logical predicates and appends them to stateList.
Mutates stateList.
Parameters:
Name Type Description namestring name of current object
oobject current object
stateListarray array of logical predicates
- Source:
-
<inner> expandProtocol(The)
-
Expand the protocol's steps. This means that commands are passed to command handlers to possibly be expanded to lower-level sub-commands.
Mutates protocol.
Parameters:
Name Type Description TheProtocol protocol.
- Source:
Returns:
The final state of objects.
- Type
- object
-
<inner> expandStep(protocol, prefix, step, objects)
-
Expand the given step by passing a command to its command handler and recursively expanding sub-steps.
Mutates protocol. However, since protocol.objects should still hold the initial objects after processing, rather than mutating protocol.objects during processing, a separate
objectsvariable is mutated, which starts out as a deep copy of protocol.objects.Parameters:
Name Type Description protocolProtocol the protocol
prefixarray array of string representing the current step ID (initially []).
stepobject the current step (initially protocol.steps).
objectsobject a mutable copy of the protocol's objects.
- Source:
-
<inner> loadProtocol(a, b [, url])
-
Finishing loading/processing an unprocessed protocol: handle imports, directives, and file nodes
Parameters:
Name Type Argument Description aObject Previously loaded protocol data
bObject The protocol to pre-process
urlString <optional>
The url of the protocol
- Source:
Returns:
protocol with
- Type
- Object
-
<inner> loadUrlContent(url, filecache)
-
Loads the raw content at the given URL. Supported formats are: JSON, YAML, JavaScript, and pre-cached file data.
Parameters:
Name Type Description urlstring URL to load.
filecacheobject map of cached file data, map from URL to data.
- Source:
Returns:
content at URL.
-
<inner> mergeProtocolList(protocols)
-
Merge a list of protocols.
Parameters:
Name Type Description protocolsarray list of protocols.
- Source:
Returns:
merged protocol.
- Type
- Protocol
-
<inner> mergeProtocols(a, b)
-
Merge protocols A & B, returning a new protocol.
Parameters:
Name Type Description aObject protocol representing the result of all previous mergeProtocols
bObject newly loaded protocol to merge into previous protocols
- Source:
Returns:
result of merging protocol B into A.
- Type
- Object
-
<inner> postProcessProtocol(protocol)
-
Post-process protocol: flatten predicate list, parse wells strings for Liquid objects.
Mutates the passed protocol.
Parameters:
Name Type Description protocolObject A protocol.
- Source:
-
<inner> postProcessProtocol_variables(protocol)
-
For all variables that have a
calculateproperty, handle the calculation and put the result in thevalueproperty. For 'Data' objects: if it doesn't have a value, callDesign.flattenDesign; if its value is a filename, load the file into the valueMutates protocol.
Parameters:
Name Type Description protocolProtocol The protocol to inspect.
- Source:
-
<inner> preProcessExclamationMarks(protocol, obj, path)
-
Any properties that have a "!" suffix are renamed to not have that suffix, overwritting an already existing property if necessary. Mutates the object.
Parameters:
Name Type Description protocolProtocol objany patharray - Source:
-
<inner> preProcessQuestionMarks(protocol, obj, path)
-
Remove properties with '?'-suffix. If the propery value has a 'value!' property, add a new property to the object without the '?'-suffix and with the given value. Mutates the object. Also add the path to the property to the protocol's
fillInsParameters:
Name Type Description protocolProtocol objany patharray - Source:
-
<inner> runWithOpts(argv [, userProtocol])
-
Process a roboliq protocol.
Parameters:
Name Type Argument Description argvarray command line options.
userProtocolProtocol <optional>
an optional protocol that can be directly passed into the function rather than supplied via argv; currently this is only for testing purposes.
- Source:
Returns:
Processing results with properties
output(the final processed protocol) andprotocol(the result of merging all input protocols).- Type
- object
-
<inner> validateProtocol1(protocol)
-
Perorms a schema check, makes sure that all objects are valid.
Throws an error if the protocol isn't valid.
Parameters:
Name Type Description protocolProtocol The protocol to validate.
- Source:
Type Definitions
-
CommandHandlerResult
-
Command handler result.
Type:
- Object
- Source:
Properties:
Name Type Description errorsArray array of error strings
warningsArray array of warning strings
expansionObject | Array an array or map of sub-steps
effectsObject a map of object property effects
alternativesObject ???
-
Protocol
-
Protocol specification.
Type:
- Object
- Source:
Properties:
Name Type Description objectsObject stepsObject effectsObject predicatesArray directiveHandlersObject objectToPredicateConvertersObject commandHandlersObject planHandlersObject filesObject errorsObject warningsObject -
WellContents
-
Well contents.
Well contents are encoded as an array. The first element always holds the volume in the well. If the array has exactly one element, the volume should be 0l. If the array has exactly two elements, the second element is the name of the substance. If the array has more than two elements, each element after the volume has the same structure as the top array and they represent the mixture originally dispensed in the well.
objects: plate1: contents: A01: ["30ul", ["25ul", "water"], ["5ul", "reagent1"]]Type:
- array
- Source: