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 opts
object command line arguments as processed by nomnom.
userProtocol
Protocol <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 name
string name of current object
o
object current object
stateList
array 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 The
Protocol 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
objects
variable is mutated, which starts out as a deep copy of protocol.objects.Parameters:
Name Type Description protocol
Protocol the protocol
prefix
array array of string representing the current step ID (initially []).
step
object the current step (initially protocol.steps).
objects
object 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 a
Object Previously loaded protocol data
b
Object The protocol to pre-process
url
String <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 url
string URL to load.
filecache
object 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 protocols
array 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 a
Object protocol representing the result of all previous mergeProtocols
b
Object 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 protocol
Object A protocol.
- Source:
-
<inner> postProcessProtocol_variables(protocol)
-
For all variables that have a
calculate
property, handle the calculation and put the result in thevalue
property. 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 protocol
Protocol 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 protocol
Protocol obj
any path
array - 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
fillIns
Parameters:
Name Type Description protocol
Protocol obj
any path
array - Source:
-
<inner> runWithOpts(argv [, userProtocol])
-
Process a roboliq protocol.
Parameters:
Name Type Argument Description argv
array command line options.
userProtocol
Protocol <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 protocol
Protocol The protocol to validate.
- Source:
Type Definitions
-
CommandHandlerResult
-
Command handler result.
Type:
- Object
- Source:
Properties:
Name Type Description errors
Array array of error strings
warnings
Array array of warning strings
expansion
Object | Array an array or map of sub-steps
effects
Object a map of object property effects
alternatives
Object ???
-
Protocol
-
Protocol specification.
Type:
- Object
- Source:
Properties:
Name Type Description objects
Object steps
Object effects
Object predicates
Array directiveHandlers
Object objectToPredicateConverters
Object commandHandlers
Object planHandlers
Object files
Object errors
Object warnings
Object -
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: