A module of functions for querying and manipulating well contents.
- Source:
Methods
-
<static> checkContents(contents)
-
Validate well contents. Throws an error if they aren't valid.
Parameters:
Name Type Description contents
array The well contents.
- Source:
-
<static> flattenContents(contents)
-
Convert the contents array encoding to a map of substances to amounts
Parameters:
Name Type Description contents
array The well contents array
- Source:
Returns:
map of substance name to the volume or amount of that substance in the well
- Type
- object
-
<static> getContentsAndName(wellName, data, effects)
-
Get an object representing the effects of pipetting.
Parameters:
Name Type Description wellName
string fully qualified object name of the well
data
object The data object passed to command handlers.
effects
object The effects object for effects which have taken place during the command handler and aren't in the data object
- Source:
Returns:
[content, contentName], where content will be null if not found
- Type
- array
-
<static> getVolume(contents)
-
Get the volume of the contents array.
Parameters:
Name Type Description contents
array The well contents array
- Source:
Returns:
the mathjs volume if found, otherwise 0ul
- Type
- object
-
<static> getWellContents(wellName, data, effects)
-
Tries to find the contents array for the given well.
Parameters:
Name Type Description wellName
string name of the well
data
object the data object passed to command handlers
effects
object an optional effects object for effects which have taken place during the command handler and aren't in the data object
- Source:
Returns:
the contents array if found, otherwise null
- Type
- WellContents
-
<static> getWellVolume(wellName, data, effects)
-
Get the volume of the given well.
Parameters:
Name Type Description wellName
string name of the well
data
object the data object passed to command handlers
effects
object an optional effects object for effects which have taken place during the command handler and aren't in the data object
- Source:
Returns:
the mathjs volume if found, otherwise 0ul
- Type
- object
-
<static> isEmpty(contents)
-
Check whether the contents are empty. They are empty if the contents are undefined, an empty array, or the array begins with a number that mathjs considers equal to 0.
Parameters:
Name Type Description contents
WellContents - Source:
Returns:
true if the contents are empty
- Type
- Boolean
-
<static> transferContents(srcContents, dstContents, volume)
-
Add source contents to destination contents at the given volume.
Parameters:
Name Type Description srcContents
array current contents of the source well
dstContents
array current contents of the destination well
volume
string a string representing the volume to transfer
- Source:
Returns:
an array whose first element is the new source contents and whose second element is the new destination contents.
- Type
- array