Home | Getting Started | Generic Tools | EchoProto | EchoProto Templates | OTProto | OTProto Templates
BiomationScripter - Generic Tools
Feature Overview
The BiomationScripter package contains a set of generic tools which can be used to help write protocols for any supported automation platform. These tools take the form of classes and functions and aid in the creation of automation protocols by providing common formats and abstracting-out commonly required functions. These include classes which can store information about the format and content of plates or other labware, and functions which return valid well ranges.
Using BiomationScripter
Begin by importing the BiomatonScripter package:
import BiomationScripter as BMS
Classes
Labware_Content |
LabwareLayout |
Assembly |
Liquids |
Mastermix
Class Assembly
This class is used to store basic information about a DNA assembly
Usage:
BMS.Assembly(Name: str, Backbone: str, Parts: list[str]) returns BiomatonScripter.Assembly object
Attributes:
name|str: The assembly namebackbone|str: The name of the plasmid backboneparts|list[str]: A list of parts to be assembled into the plasmid backbone
Methods:
__init__(self, Name: str, Backbone: str, Parts: list[str])returnsBiomatonScripter.Assemblyobject- Creates the
BiomatonScripter.Assemblyobject
- Creates the
Class Labware_Content
This class is used by Labware_Layout to store content information.
Usage:
BMS.Labware_Content(Name: str, Volume: float|int, Liquid_Class: str = None) returns BiomationScripter.Labware_Content object
Attributes:
name|str: The name of the liquid/reagentvolume|float|int: The amount of the liquid/reagent (in microlitres)liquid_class|str: The liquid class or calibration for the reagent/liquid- Defaults to
None
- Defaults to
Methods:
__init__(self, Name: str, Volume: float|int, Liquid_Class: str = None)returnsBiomationScripter.Labware_Content- Creates the
BiomationScripter.Labware_Contentobject
- Creates the
get_info(self)returnsList[self.name, self.volume, self.liquid_class]- Returns as a list
self.name,self.volume, andself.liquid_class
- Returns as a list
Class: Labware_Layout
This class is used to store information, such as number of wells and content, about plates or other labware which can later be retrieved. The BMS.Labware_Layout class is also intended to be universal within BiomationScripter, and not specific to any particular automation equipment.
Labware_Layout objects are separate from, but sometimes related to, any object which is meant to represent a physical instance of a piece of labware. The Labware_Layout class captures information about a piece of labware, such as its content. Within BiomationScripter you may come across other classes which are used to represent labware, such as 'opentrons.protocol_api.labware.Labware' from the Opentrons Python API. The 'opentrons.protocol_api.labware.Labware' class is distinct from the BMS.Labware_Layout class as the Opentrons class represents the physical instance of the labware and is specific to the Opentrons liquid handling system, whereas BMS.Labware_Layout can capture additional metadata and can be utilised by multiple automation equipment within the BiomationScripter context.
Usage:
BMS.Labware_Layout(name: str, type: str) returns BiomationScripter.Labware_Layout object
Attributes:
name|str: A readable name for the plate/labware.type|str: The type for the plate/labware.rows|int: Number of rows.columns|int: Number of columns.content|dict{str: list[BiomationScripter.Labware_Content]}: Dictionary storing content of the plate.- Dictionary key is the well ID (e.g. "A1")
- Value is a list of
Labware_Contentobjects
available_wells|list[str] = None: List of wells in the plate which are available for use- If
None, this means that no available wells have been specified, and is distinct from[], which means there are no available wells
- If
empty_wells|list[str] = None: List of wells in the plate which are available and empty- If
None, this means that no empty wells have been specified, and is distinct from[], which means there are no empty wells - This is generated automatically when
available_wellsare specified, and it automatically updated when content is added and removed
- If
well_labels|dict{str: str} = {}: A dictionary of well labels- The well position is used as the key
- The label is used as the value
Methods:
__init__(self, Name: str, Type: str)returnsBiomationScripter.Labware_Layout- Creates a
BiomationScripter.Labware_Layoutobject with a name and labware type. Nameis stored asself.nameand is required with no default value.Typeis stored asself.typeand is required with no default value.self.rowsis instantiated asNoneself.columnsis instantiated asNoneself.contentis instantiated as an emptydict{}self.available_wellsis instantiated asNoneself.empty_wellsis instantiated asNoneself.well_labelsis instantiated as an emptydict{}
- Creates a
define_format(self, Rows: int, Columns: int)returnsNone- Defines the number of rows, columns, and wells for the labware.
Rowsis stored asself.rowsand is required with no default value.Columnsis stored asself.columnsand is required with no default value.
get_format(self)returnslist[str]- Returns the number of rows and columns for the labware
- Returns
[self.rows, self.columns]
set_available_wells(self, Well_Range: str = None, Use_Outer_Wells: bool = True, Direction: str = "Horizontal", Box: bool = False)returnsNone- Adds the specified wells to
self.available_wellsandself.empty_wells - When no arguments are specified, all wells are specified as available for use
Well_Rangecan be a range of wells specified as First_Well:Last_Well (e.g."A1:B4"), or a single well (e.g."C6")- When
Use_Outer_Wells = False, wells from the first and last rows, and the first and last columns, are not included, even if the well range specifies them - The
Directionargument determines the order in which wells are counted. IfDirection = "Horizontal", wells are added to the list starting with those on the same row, before moving to the next row. For example, the well range A2:B4 would begin by adding wells in row 'A' (A2, A3, A4,...), and then move on to row 'B'. IfDirection = "Vertical", wells will instead be added to the list starting with those in the same column (A1, B1, C1,...), and then move on to subsequent columns (A2, B2, C2,...) - The
Boxargument determines whether the well range has a box-like shape. For example, ifBox = True, the well range A2:C4 would returns the wells A2, A3, A4, B2, B3, B4, C2, C3, C4. IfBox = False, then the well range A2:C4 would instead include all wells between A2 and C4 up to the boundary of the plate.
- Adds the specified wells to
get_available_wells(self)returnslist[str]- Returns a list of available wells
- If
Noneis returned, then no available well range has been specified
get_well_range(self, Well_Range: str = None, Use_Outer_Wells: bool = True, Direction: str = "Horizontal", Box: bool = False)returnsList[str]- Returns a list of wells (e.g.
["A1", "A2", "A3"]) Well_Rangecan be a range of wells specified as First_Well:Last_Well (e.g."A1:B4"), or a single well (e.g."C6")- When
Use_Outer_Wells = False, wells from the first and last rows, and the first and last columns, are not included, even if the well range specifies them - The
Directionargument determines the order in which wells are counted. IfDirection = "Horizontal", wells are added to the list starting with those on the same row, before moving to the next row. For example, the well range A2:B4 would begin by adding wells in row 'A' (A2, A3, A4,...), and then move on to row 'B'. IfDirection = "Vertical", wells will instead be added to the list starting with those in the same column (A1, B1, C1,...), and then move on to subsequent columns (A2, B2, C2,...) - The
Boxargument determines whether the well range has a box-like shape. For example, ifBox = True, the well range A2:C4 would returns the wells A2, A3, A4, B2, B3, B4, C2, C3, C4. IfBox = False, then the well range A2:C4 would instead include all wells between A2 and C4 up to the boundary of the plate.
- Returns a list of wells (e.g.
check_well(self, Well: str)returnsbool- Checks whether
Well(e.g. "A1") is a valid well in the current plate - Returns
Trueif the well is present, andFalseif it is not - Can be used to check if a well is out of range
- Checks whether
clone_format(self, Name: str)returnsBiomationScripter.Labware_Layout- Creates a new
BiomationScripter.Labware_Layoutobject with the same format Nameis used as the new name- Content in the current plate is not copied, only the format (
self.type,self.rows, andself.columns)
- Creates a new
add_content(self, Well: str, Reagent: str, Volume: float, Liquid_Class: str/boolean = False)returnsNone- Creates a
Labware_Contentobject and adds toself.contentin the form{Well: [ [BiomationScripter.Labware_Content] ]} - Will not overwrite any currently stored content in the well, and will instead append the new content to any current content
Wellis a required value with no default which can have two forms: either a single well (e.g."A1"), or a well range, where the first well is separated from the last well by a colon (e.g."A1:A5")- If
Wellspecifies a well range, the specified content will be added to all wells. Reagentis a required value with no default.Volumeis a required value which should be specified in microlitres, and has no default.Liquid_Classis an optional value, with a default ofFalse.
- Creates a
bulk_add_content(self, Wells: List[str], Reagents: List[str], Volumes: List[float] OR float, Liquid_Classes: List[str] = None)returnsNone- Bulk adds a list of reagents to the
Labware_Layoutcontent - For each position in the
Reagentslist, the reagent specified will be added to the well specified byWellswith a volume specified byVolumesand a liquid class specified byLiquid_Classes - For example, if
Liquids = ["Reag 1", "Reag 2", "Reag 3"],Wells = ["A1", "B5", "D12"],Volumes = [10, 12, 15], andLiquid_Classes = None, thenReag 1would be added to wellA1with a volume of10uL,Reag 2would be added to wellB5with a volume of12uL, andReag 3would be added to wellD12with a volume of15uL - If
Volumeswas a single float instead of a list, then all reagents would be added at that volume instead
- Bulk adds a list of reagents to the
get_content(self)returnsself.content: dict{str: [BiomationScripter.Labware_Content]}- Returns all stored content in the
BiomationScripter.Labware_Layoutobject as a dictionary
- Returns all stored content in the
get_occupied_wells(self)returnslist[str]- Returns a list of all wells which appear in
self.content(i.e. wells which have content specified for them) - If
self.contentis empty, and empty list is returned
- Returns a list of all wells which appear in
get_liquids_in_well(self, Well: str)returnslist[str]- Returns a list of liquid names which are present in the well specified by
Well - If
Wellis not present inself.content, an error will be raised
- Returns a list of liquid names which are present in the well specified by
get_wells_containing_liquid(self, Liquid_Name: str)returnslist[str]- Returns a list of wells which contain
Liquid_Name - If no wells are present which containing
Liquid_Name, an empty list is returned
- Returns a list of wells which contain
clear_content(self)returnsNone- Clears the entire dictionary stored as
self.content
- Clears the entire dictionary stored as
clear_content_from_well(self, Well: str)returnsNone- Clears all content in one well by deleting the entry in
self.contentwith a key ofWell
- Clears all content in one well by deleting the entry in
get_volume_of_liquid_in_well(self, Liquid: str, Well: str)returnsfloat- Returns the volume of
LiquidinWell - If
Wellis not present inself.contentan error is raised - If
Liquidis not present inWell,0.0is returned
- Returns the volume of
update_volume_in_well(self, Volume: float/int, Reagent: str, Well: str)returnsNone- Changes the current volume of
Reagentin wellWelltoVolume - If
Welldoes not exist inself.content, an error will be raised
- Changes the current volume of
get_total_volume_of_liquid(self, Liquid: str)returnsfloat- Returns the total volume of the specified liquid across all wells of the labware
print(self)returnsstr- Pretty prints all content stored in
self.content - Returns a
strwith the same content which is printed
- Pretty prints all content stored in
import_labware(self, filename: str, path: str = "~", ext: str = ".xlsx")returnsNone- Used by the
BiomationScripter.Import_Labware_Layoutfunction.
- Used by the
add_well_label(self, Well: str, Label: str)returnsNone- Assigns the label specified by
Labelto the well specified byWell - Well labels must be unique or an error will be raised
- Adds the label to
self.well_labels
- Assigns the label specified by
get_well_content_by_label(self, Label: str)returnsLabware_Contentobject- Returns the
Labware_Contentobject in the well with a label ofLabel
- Returns the
get_well_location_by_label(self, Label: str)returnsstr- Retuns the well position as a
strwhich has label ofLabel
- Retuns the well position as a
get_next_empty_well(self)returnsstr- Returns the next well positon as
strwhich is specified as being empty - Returns in the order specified by
self.available_wells, and checksself.empty_wellsto see if the next available well is empty
- Returns the next well positon as
Class: Liquids
Warning
This class may be removed without warning. Use Labware_Layout instead where possible.
This class is used to store information about liquids and where they are stored.
Usage:
BMS.Liquids() returns BiomationScripter.Liquids object
Attributes:
liquids|dict{str: list[str/obj, str]}: dictionary storing information about the liquids- Dictionary key is the name of the liquid
- Dictionary values take the form of a list, formatted as [
labware,source_well] labwaremay be either a string, which defines the name of the labware, or an object which represents the labware- 'source_well' is a string (e.g. "A1")
Methods:
__init__(self)returnsBiomationScripter.Liquids- Creates a 'BiomationScripter.Liquids' object
self.liquidsis initiated as an empty dictionary
add_liquid(self, liquid: str, labware: str/obj, source_well: str)returnsNone- Adds a liquid to
self.liquids liquidacts as the dictionary keylabwareandsource_wellare added as dictionary values, in the formatlist[labware, source_well]
- Adds a liquid to
get_liquid_labware(self, liquid: str)returnsstr/obj- Returns the labware stored for the specified
liquid
- Returns the labware stored for the specified
get_liquid_well(self, liquid: str)returnsstr- Returns the source well for the specified
liquid
- Returns the source well for the specified
add_liquids_to_labware(self, liquids: list[str], labware: str/obj, blocked_wells = None: list[str], well_range = None: list[str])returnsNone- Adds a list of liquids to a specified labware in order using any available wells
blocked_wellsis, by default,Noneblocked_wellscan be a list of well names (e.g. ["A1", "B1", "C1"]) which should not be used when assigning liquids to wellswell_rangeis, by default,Nonewell_rangecan be a list of well names (e.g. ["A1", "B1", "C1"]) which should be used when assigning liquids to wells- If both
blocked_wellsandwell_rangeare defined, any wells present in both lists will be removed fromwell_range
get_all_liquids(self)returnslist[str]- Returns a list of all keys in
self.liquids
- Returns a list of all keys in
Class Mastermix
This class is used by BMS.mastermixes_by_min_volume to store information about a mastermix. It is not intended for use outside of this function. Even though the BMS.mastermixes_by_min_volume returns this class, it shouldn't ever need to be used or understood.
Usage:
BMS.Mastermix(Name: str, Reagents: list[str], Wells: list[str]) returns BiomatonScripter.Mastermix object
Attributes:
name|str: The name of the mastermixreagents|str: A list of reagents in the mastermix and their volumes - the reagent and its volume is stored as a list in the format"Reagent_vol_Volume", where"_vol_"is always in the string to separate the reagent name and the volume - the volume must be written in numerical form (i.e."5"rather than"five")wells|list[str]: A list of destination wells serviced by the mastermix, given in the format"index_well", where the index is the index of the destination labware
Methods:
__init__(self, Name: str, Reagents: list[str], Wells: list[str])returnsBiomatonScripter.Mastermixobject- Creates the
BiomatonScripter.Mastermixobject
Functions
Aliquot_Calculator |
Create_Labware_Needed |
fmol_calculator |
Get_Transfers_Required |
Import_Labware_Layout |
mastermixes_by_min_volume |
Reagent_Finder |
well_range
Function: Aliquot_Calculator
This function can be used to determine how many aliquots of a specific source material are required to fill a set of destination labware.
Usage:
BMS.Aliquot_Calculator(Liquid: str, Destination_Layouts: List[BiomationScripter.Labware_Layout], Aliquot_Volume: float, Dead_Volume: float) returns int
Arguments:
Liquid|str: The name of the source materialDestination_Layouts|List[BiomationScripter.Labware_Layout]: A list ofBiomationScripter.Labware_Layoutobjects - these labware must be the destination labware into which the source material will be transferred, where the labware is already populated with the source material as contentAliquot_Volume|float: The volume of each aliquotDead_Volume|float: The dead volume for each aliquot - this can be set to0if there is no dead volume Not Recommended
Behaviour:
The function searches the provided destination BiomationScripter.Labware_Layout objects for the specified liquid and calculates the total volume of liquid required. This total volume is divided by the aliquot volume (minus any dead volume) and rounded up to the next integer.
Function: Create_Labware_Needed
This function calculates how many plates of a certain type are required for a protocol and returns a list of BiomationScripter.Labware_Layout objects.
Usage:
BMS.Create_Labware_Needed(Labware_Format: BiomationScripter.Labware_Layout, N_Wells_Needed: int, N_Wells_Available: int/str = "All", Return_Original_Layout: bool = True) returns list[BiomationScripter.Labware_Layout]
Arguments:
Labware_Format|BiomationScripter.Labware_Layout:Labware_Layoutobject to be used as the templateN_Wells_Needed|int: Total number of wells or slots required by the protocolN_Wells_Available|int/str = "All": Either the number of wells/slots available per plate/labware (int), or"All", which specifies that all wells/slots in the labware are available (str)Return_Original_Layout|bool = True: Specifies whether the layout given inLabware_Formatshould be returned or not
Behaviour:
Warning
-
If the
BiomationScripter.Labware_Layoutobject specified byLabware_Fomrathas content specified, this content will not be added to theBiomationScripter.Labware_Layoutobjects which are returned. -
The original
BiomationScripter.Labware_Layoutobject is returned as the first element in the returned list.
Create_Labware_Needed calculates how many plates or other type of labware are needed for a protocol based on the number of wells/slots required (N_Wells_Needed) and the number of wells/slots available per plate/labware (N_Wells_Available). That number of BiomationScripter.Labware_Layout objects will then be created using the BiomationScripter.Labware_Layout specified by the Labware_Format argument as a template. These objects are then returned as a list.
Function: fmol_calculator
Calculates the number of fmols of a dsDNA molecule based on the mass (ng) and length (bp).
Usage:
BMS.fmol_calculator(mass_ng: float, length_bp: int) returns float
Arguments:
mass_ng|float: The mass of the dsDNA sample in nanogramslength_bp|int: The length of the dsDNA molecule in base pairs
Behaviour:
Calculates fmols of dsDNA molecules in a sample. Uses the following equation:
Function: Get_Transfers_Required
This function determines the transfer events required to populate a set of destination BiomationScripter.Labware_Layout objects with a specific liquid.
Usage:
BMS.Get_Transfers_Required(Liquid: str, Destination_Layouts: List[BiomationScripter.Labware_Layout]) returns transfer_volumes: List[float], destination_wells: List[str], destination_layouts: List[BiomationScripter.Labware_Layout]
Arguments:
Liquid|str: The liquid for which transfer events should be determinedDestination_Layouts|List[BiomationScripter.Labware_Layout]: A list ofBiomationScripter.Labware_Layoutobjects - these labware must be the destination labware into which the source material will be transferred, where the labware is already populated with the source material as content
Behaviour:
Note
This function does NOT determine the source positions for the transfer events, it simply determines required transfer events. Automation equipment specific functions, such as the OTProto.dispense_from_aliquots function, can use the information from Get_Transfers to determine suitable source locations and perform the actual liquid handling.
The destination BiomationScripter.Labware_Layout objects supplied are searched for the specified liquid. For each well found which contains the liquid, the required volume, well ID, and Labware_Layout object are stored in separate lists. These lists are then returned.
Each position in the three lists describe a required transfer event. For example, if the below is true, then event_1 would required event_1_volume uL of liquid transferred to well event_1_destination_well in the destination labware described by event_1_destination_layout.
event_1_volume = transfer_volumes[0]
event_1_destination_well = destination_wells[0]
event_1_destination_layout = destination_layouts[0]
Function: Import_Labware_Layout
This function imports an Excel file with a standard layout and converts it to a BiomationScripter.Labware_Layout object.
Usage:
BMS.Import_Labware_Layout(Filename: str, path: str = "~", ext: str = ".xlsx") returns BiomationScripter.Labware_Layout
Arguments:
Filename|str: Location of an Excel file (relative to home directory) specifying the desired labware layoutpath|str = "~": The path to prepend to the file location passed toFilename, default is the home directoy ("~")ext|str = ".xlsx": The file extension for the file passed toFilename, default is an excel file (".xlsx")
Behaviour:
This function will import a layout specified by an excel file as a BiomationScripter.Labware_Layout object. The excel file should follow the standard described here
Warning
- This function requires the pandas library to operate. If pandas has not successfully imported, this function will not work.
The Plate Name and Plate Type fields are required fields for the Plate Summary sheet (Sheet1).
The Well and Name fields must be populated on the Well lookup sheet (Sheet2) if content in these wells needs to be added. If Name is empty, the function will assume that this well is empty and will skip over it. If Volume (uL) - Current is empty, Volume (uL) - Initial will be used instead. If both volume fields are empty, volume will be zero. If Calibration Type is empty, "AQ_BP" will be used as a default value.
An empty PlateLayout object should be created prior to calling this function and the function will populate the object with the required attributes.
Plate = BMS.Labware_Layout(name: str, type: str)
Plate.Import_Labware_Layout(Filename: str, path: str = "~", ext: str = ".xlsx")
Function: mastermixes_by_min_volume
This function can be used to automatedly generate mastermixes based on source materials in a list of destination labware layout objects, and user-defined parameters.
Usage:
BMS.mastermixes_by_min_volume(Destination_Layouts: List[BMS.Labware_Layout], Mastermix_Layout = BMS.Labware_Layout, Maximum_Mastermix_Volume: float, Min_Transfer_Volume: float, Extra_Reactions: float, Excluded_Reagents: List[str] = [], Excluded_Combinations: List[List[str]] = [], Preferential_Reagents: List[str] = [], Seed: int = None) returns (Mastermixes: List[BMS.Mastermix], Seed: int, Destination_Layouts: List[BMS.Labware_Layout], Mastermix_Layouts: List[BMS.Labware_Layout])
See the walkthrough here.
Arguments:
Destination_Layouts|List[BMS.Labware_Layout]: List ofBMS.Labware_Layoutobjects representing the final state of the destination labware to prepare mastermixes for - must be fully populated with all source material required in each wellMastermix_Layout|BMS.Labware_Layout: ABMS.Labware_Layoutobject representing the labware for the mastermixes - should be empty (i.e. not content specified), but the labware format should be givenMaximum_Mastermix_Volume|float: Maximum volume (in microlitres) for each mastermix - should not be more than the maximum well capacity for the mastermix labwareMin_Transfer_Volume|float: The minimum transfer volume (in microlitres) for any liquids into or from the mastermixesExtra_Reactions|float: The number of extra reactions each mastermix should be prepared for - can be used to account for pipetting inaccuracy or well dead volumes - can be a proportion of a reaction (e.g. prepare for 1.5 extra reactions)Excluded_Reagents|List[str] = []: A list of reagents which should not be included in any mastermixes - this will remain as source materials in the destination labware layout(s)Excluded_Combinations|List[List[str]] = []: A list of lists, where each sub-list contains reagents names which should not be combined within the same mastermixPreferential_Reagents|List[str] = []: A list of reagents which should be considered first as components of a mastermixSeed|int = None: A seed can be supplied for the random generated sections of the function, to ensure repeatability - if no seed is specified then different seeds will be tried until a solution is found (or after there has been too many attempts)
Behaviour:
This function can be used to automatically generate mastermixes for a given list of destination labware layouts. The mastermixes are generated by finding common source reagents across destination wells, and grouping them together in the minimal amount of mastermixes. The mastermixes generated are stored in BMS.labware_layout objects and also returned as a list of BMS.Mastermix objects.
The exact composition of the mastermixes generated can be influenced by through the use of arguments listed above. In some cases, these arguments may provide too many constraints and result in an impossible situation where mastermixes cannot be generated. To help ensure many different combinations are attempted, there is some randomness within the function. This randomness can be removed by supplying a specific seed, which ensures that the same mastermixes are generated each time.
Function: Reagent_Finder
Searches a directory containing labware layout files for a specified reagent.
Usage:
BMS.Reagent_Finder(Reagents: List[str], Directories: List[str]) returns None
Arguments:
Reagents|List[str]: A list of reagent names to search forDirectories|List[str]: A list of directories containing labware layout files
Behaviour:
This function will search in the directories listed for files which appear to be BMS labware layout files. Any labware layout files found will then be searched for the specified reagents. The name of all reagents are then printed to OUT, along with the name of the labware layout they appear in and the well(s) they occupy.
Function: well_range
This function returns a list of wells based on a specified well range and direction. Wells are always in the format of row followed by column, where row is a letter and column is an integer (e.g. A1, D6, C12, B7, etc.).
Usage:
BMS.well_range(Wells: str, Labware_Format: BiomationScripter.Labware_Layout | (int, int) = None, Direction: "Horizontal" | "Vertical" = "Horizontal", Box: bool = True) returns list[str]
Arguments:
Wells|str: A string specifying the range of wells to return - must always have the following format:"{}{}:{}{}".format(Starting Well Row, Starting Well Column, End Well Row, End Well Column), e.g."A1:B4"Labware_Format|BiomationScripter.Labware_LayoutOR (int, int) =None: Plate/labware type to give context to the well range being returned, or a tuple specifying the number of rows and columns in the labware (e.g. (8, 12))Direction|"Horizontal" OR "Vertical" = "Horizontal": Direction to use when calculating wells in the specified well range - must be either"Horizontal"or"Vertical"Box|bool = True: Determines the well range 'shape' - can only beFalseifLabware_Formatis specified
Behaviour:
BiomationScripter.well_range returns a list of wells based on the well range specified by Wells. The exact wells which are returned, and the order they are placed in the list, is determined by the Direction, Labware_Format, and Box arguments.
The Direction argument determines the order in which wells are counted. If Direction = "Horizontal", wells are added to the list starting with those on the same row, before moving to the next row. For example, the well range A2:B4 would begin by adding wells in row 'A' (A2, A3, A4,...), and then move on to row 'B'. If Direction = "Vertical", wells will instead be added to the list starting with those in the same column (A1, B1, C1,...), and then move on to subsequent columns (A2, B2, C2,...).
The Box argument determines whether the well range has a box-like shape. For example, if Box = True, the well range A2:C4 would returns the wells A2, A3, A4, B2, B3, B4, C2, C3, C4. If Box = False, then the well range A2:C4 would instead include all wells between A2 and C4 up to the boundary of the plate. So for a standard 96 well plate, this would return wells A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, C1, C2, C3, C4. The order of these wells in both examples would be dependent on the Direction argument.
If Box = False, then Labware_Format must be specified using a BiomationScripter.Labware_Layout object, which defines the number of rows and columns in the plate, or a list specifying the number of rows and columns the labware has. If Box = False and Labware_Format = None, an error will occur.
The image below sums up this information:

Exceptions
- NegativeVolumeError: Used when a calculation error occurs and volume less than 0 is specified
- RobotConfigurationError: Used when automation equipment is not configured correctly, or when information about the equipment is missing
- BMSTemplateError: Used when an error specific to a template occurs
- LabwareError: Used for issues relating to missing, incorrect, or inappropriate labware
- OutOfSourceMaterial: Used when not enough source material is available for the intended transfer step/protocol
- TransferError: Used to indicate a general problem with a transfer event