moclo_assembly.moclo_transformation.moclo_transform_generator
moclo_function
Main function, creates scripts and metainformation Can take specific args or just **labware_dict for all labware
Arguments:
output_folder
- the full file path of the intended output folder for files generatedconstruct_path
- a one element list with the full path of the construct csvpart_path
- a list of full paths to part csv(s) (one or more)thermocyle
- True or False, indicating whether the user has and would like to use the Opentrons Thermocycler see labware_dict for rest of arguments
Returns:
List of output paths If there is an exception, the list of output paths will contain only one element = the error path Otherwise the list of output paths will contain: OT-2 script paths (assembly, transformation), metainformation (assembly, transformation, agar plate)
generate_plate_maps
Generates dictionaries for the part csvs Args: filename = absolute path to part csv Returns: dictionary of plate maps with key = name of part csv, value = list of rows (= list of lists)
generate_combinations
Generates a list of dictionaries of constructs to be made Args: combinations_filename = absolute path to construct csv file Returns: List of construct dictionaries with keys "name" and "parts"
check_number_of_combinations
Ensures that the number of constructs does not exceed the maximum
Arguments:
combinations_limit
- "single" or "triplicate" - if "single" can do max 88 constructs, if "triplicate" does every construct 3 times - max 24 constructsRaises
- ValueError if there are too many constructs or combinations_limit is not "single" or "triplicate"
generate_and_save_output_plate_maps
Saves the mapping of the agar plate for use in transformation.
Arguments:
combinations_to_make = list of construct dictionaries combinations_limit = "single" or "triplicate" output_folder_path = where to save mapping
Returns:
triplicate
- whether 'single' (triplicate = False) or 'triplicate' (triplicate = True) is selectedoutput_filename
- the absolute path to the agar plate csv
create_metainformation
Returns detailed metainformation and saves in a csv. Includes a parts dataframe, a combinations (constructs) dataframe, a reagents dataframe, and a master mix dataframe.
Arguments:
output_path
- the full path of the output folderdna_plate_map_dict
- the dictionary of partscombinations_to_make
- the list of dictionaries of constructslabware_dict
- the dictionary of labware chosenthermocyle
- whether the thermocycler module is usedtriplicate
- whether 'single' (triplicate = False) or 'triplicate' (triplicate = True) is selected
Returns:
parts_df
- dataframe of partscombinations_df
- dataframe of constructsmm_df
- master mix dataframe, contains information on all of the master mixes needed (different master mix needed for different number of parts per construct)reagents_df
- reagents dataframe, contains information on all of the reagents, does not include master mix but DOES include reagents to go into master mixes
create_parts_df
Returns a dataframe of parts and delegates wells. Takes in the dictionary of parts.
Arguments:
dna_plate_map_dict
- dictionary with keys = plate names, values = list of rows = list of list of parts
Returns:
parts_df
- dataframe of parts with dummy '0' for combinations col
create_mm_df
Creates a master mix dataframe and delegates wells. Different master mixes must be created depending on the number of parts per construct. Args: combinations_df = dataframe of constructs Returns: dataframe of master mixes with wells and volumes of different reagents required
create_reagents_df
Creates a dataframe of reagents used to make master mixes. More than one buffer well may be required, and water is held on a separate plate. Also indicates which master mix wells the reagent is transferred to. Args: master mix dataframe Returns: dataframe of reagents used in master mix + water
get_mm_dicts
Master mix dictionary purely for use in the assembly script. Provides instructions on tranfers.
Arguments:
mm_df = dataframe of master mix, gives wells and diff vol needed reagents_df = dataframe of reagents to be used in master mix and other parts of assembly
Returns:
reagent_to_mm_dict
- dictionary directing where to transfer each reagent to to make master mixes, key = reagent well, value = list of tuples of reagent plate (different for water and other reagents), master mix well, and volume to be transferred mm_dict_list = mm_df rows stored as dictionaries in list
index_to_well_name
Converts well from number format to letter format Args: well in number format e.g. 0 Returns: well in letter format e.g. 'A1'
create_transform_metainformation
Saves transform metainformation and labware informaiton. SOC used in two steps: adding soc (150 uL) and dilution (45 uL) times by 96 as reaction plate has 96 wells Add 300 (1502) and 90 (452) as dead vols Agar plate positions in agar plate csv
Arguments:
output_path
- absolute path to transformation metainformation filelabware_dict
- dictionary of labware to be usedtriplicate
- whether 'single' (triplicate = False) or 'triplicate' (triplicate = True) is selectedmulti
- whether an 8 channel (multi = True) or single channel (mutli = False) p300 pipette is being used
create_protocol
Generates the assembly and transformation protocols used by opentrons. Returns the paths of the assembly and transform scripts.
Arguments:
dna_plate_map_dict
- the dictionary of partscombinations_to_make
- the list of dictionaries of constructsreagent_to_mm_dict
- dictionary directing where to transfer each reagent to to make master mixes, key = reagent well, value = list of tuples of reagent plate (different for water and other reagents), master mix well, and volume to be transferred mm_dict_list = mm_df rows stored as dictionaries in listassembly_template_path
- the absolute path of the assembly template scripttransform_template_path
- the absolute path of the transformation template scriptoutput_folder_path
- the absolute path to the output folder that will contain the assembly and transformation protocolsthermocycle
- whether or not the Opentrons thermocycler module is being usedtriplicate
- whether 'single' (triplicate = False) or 'triplicate' (triplicate = True) is selectedmulti
- whether an 8 channel (multi = True) or single channel (mutli = False) p300 pipette is being usedp10_mount
- "left" or "right", the Opentrons pipette mount optionsp300_mount
- "left" or "right", the Opentrons pipette mount optionsp10_type
- the name of the p10 pipette, e.g. "p10_single"p300_type
- the name of the p300 pipette, e.g. "p300_single"reaction_plate_type
- the name of the well plate type used as the source and construct platereagent_plate_type
- the name of the well plate type used as the reagent plate (for master mix and non-water reagents)trough_type
- the name of the trough type used for water and socagar_plate_type
- the name of the agar plate type used