Module for parsing strings that represent wells and labware.
- Source:
Methods
-
<static> locationRowColToText(row, col)
-
Converts a row and column index to a string. For example,
[1, 1] => A01, and[8, 12] => H12.Parameters:
Name Type Description rownumber row of well
colnumber column of well
- Source:
Returns:
string representation of location of well on labware
- Type
- string
-
<static> locationTextToRowCol(location)
-
Take a well identifier (e.g. A01) and returns an integer array representing the row and column of that well.
Parameters:
Name Type Description locationstring a well identifier starting with a capital letter and followed by a number (e.g. A01)
- Source:
Returns:
an integer array of
[row, col]. The values are 1-based (i.e. row 1 is the first row)- Type
- array
-
<static> parse(text, objects [, config])
-
Parses a text which should represent one or more labwares and wells. If the
objectsparameter is passed, this function will return an array of the individual wells; otherwise it will return the raw parser results.Parameters:
Name Type Argument Description textstring text to parse
objectsobject map of protocol objects, in order to find labwares and number of rows and columns on labware.
configobject <optional>
optional object that contains properties for 'rows' and 'columns', in case we want to expand something like 'A1 down C3' without having specified a plate
- Source:
Returns:
If the
objectsparameter is passed, this function will return an array of the individual wells; otherwise it will return the raw parser results.- Type
- array
-
<static> parseOne(text)
-
Parses a string which should represent a single well, and return the raw parser results.
Parameters:
Name Type Description textstring text to parse
- Source:
Returns:
an object representing the raw parser results.
- Type
- object
-
<inner> processParserResult(result, objects, text [, config])
-
Take the raw parser results and return an array of location names, one entry for each well.
Parameters:
Name Type Argument Description resultarray raw parser results.
objectsobject map of protocol objects, in order to find labwares and number of rows and columns on labware.
textstring the original text that was parsed; this is merely used for error output.
configobject <optional>
optional object that contains properties for 'rows' and 'columns', in case we want to expand something like 'A1 down C3' without having specified a plate
- Source:
Returns:
array of names for each plate + well (e.g.
plate1(C04))- Type
- array