Module: parsers/wellsParser

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
row number

row of well

col number

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
location string

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 objects parameter 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
text string

text to parse

objects object

map of protocol objects, in order to find labwares and number of rows and columns on labware.

config object <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 objects parameter 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
text string

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
result array

raw parser results.

objects object

map of protocol objects, in order to find labwares and number of rows and columns on labware.

text string

the original text that was parsed; this is merely used for error output.

config object <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