BMS.Import_Labware_Layout() Function¶
Standard layout files, as defined here, can be imported as BMS.Labware_Layout objects using the BMS.Import_Labware_Layout function. This can be useful when labware, such as storage plates, will be kept and re-used in multiple protocols as the labware doesn't need to be re-defined every time.
Usage¶
First, the BMS generic tools module is imported as BMS
In [1]:
Copied!
import BiomationScripter as BMS
import BiomationScripter as BMS
The BMS.Import_Labware_Layout function takes three arguments:
In [2]:
Copied!
# Filename is the name of the layout file
DNA_Stocks_Filename = "Example DNA Stocks"
# path is the path to the file, as a default the home directory is specified
DNA_Stocks_Path = "../../../For docs/Labware_Layout_Files/"
# Finally, ext is the file extension. This is ".xlsx" by default
DNA_Stocks_Ext = ".xlsx"
# Filename is the name of the layout file
DNA_Stocks_Filename = "Example DNA Stocks"
# path is the path to the file, as a default the home directory is specified
DNA_Stocks_Path = "../../../For docs/Labware_Layout_Files/"
# Finally, ext is the file extension. This is ".xlsx" by default
DNA_Stocks_Ext = ".xlsx"
Using the information defined above, the file can be imported as a BMS.Labware_Layout object
In [3]:
Copied!
DNA_Stocks_Layout = BMS.Import_Labware_Layout(
Filename = DNA_Stocks_Filename,
path = DNA_Stocks_Path,
ext = DNA_Stocks_Ext
)
DNA_Stocks_Layout = BMS.Import_Labware_Layout(
Filename = DNA_Stocks_Filename,
path = DNA_Stocks_Path,
ext = DNA_Stocks_Ext
)
The BMS.Labware_Layout object can then be used in the same way as any other Layout object. Note that any changes made here are NOT written to the file.
In [4]:
Copied!
DNA_Stocks_Layout.print()
DNA_Stocks_Layout.print()
Information for Example DNA Stocks Plate Type: 384PP Well Volume(uL) Liquid Class Reagent A1 50.0 AQ_BP pOdd1 A2 50.0 AQ_BP J23100 A3 50.0 AQ_BP B0034 A4 50.0 AQ_BP GFP A5 50.0 AQ_BP mCherry A6 50.0 AQ_BP B0015
Out[4]:
'A1\t50.0\t\tAQ_BP\t\tpOdd1\nA2\t50.0\t\tAQ_BP\t\tJ23100\nA3\t50.0\t\tAQ_BP\t\tB0034\nA4\t50.0\t\tAQ_BP\t\tGFP\nA5\t50.0\t\tAQ_BP\t\tmCherry\nA6\t50.0\t\tAQ_BP\t\tB0015\n'