Skip to content

Commit

Permalink
Export a platemap in the doe example
Browse files Browse the repository at this point in the history
  • Loading branch information
veghp committed Oct 4, 2024
1 parent 85ee20d commit 5cc0599
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions examples/doe_example/doe_example.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
from plateo.parsers import plate_from_content_spreadsheet
from plateo.applications.doe import (import_valuetable_from_csv, convert_valuetable_to_volumetable, convert_volumetable_to_actiontable)
from plateo.applications.doe import (
import_valuetable_from_csv,
convert_valuetable_to_volumetable,
convert_volumetable_to_actiontable,
)
from plateo.containers import Plate96
from plateo.parsers.picklist_from_tables import picklist_from_dataframe
from plateo.exporters import (picklist_to_tecan_evo_picklist_file, plate_to_content_spreadsheet)
from plateo.exporters import (
picklist_to_tecan_evo_picklist_file,
plate_to_content_spreadsheet,
plate_to_platemap_spreadsheet,
)

# READ THE SOURCE PLATE FROM A CONTENT SPREADSHEET
source_plate = plate_from_content_spreadsheet("Source_Plate.xlsx")
Expand All @@ -24,7 +32,12 @@
actiontable.head()

# CREATE PICKLIST THEN EXPORT IT AS A TECAN (GEMINI) WORKLIST
picklist = picklist_from_dataframe(dataframe=actiontable, source_plates=[source_plate], dest_plates=[dest_plate], df_columns=None)
picklist = picklist_from_dataframe(
dataframe=actiontable,
source_plates=[source_plate],
dest_plates=[dest_plate],
df_columns=None,
)
picklist_to_tecan_evo_picklist_file(picklist, "out_tecan_picklist.gwl")

# SIMULATE THE PICKLIST
Expand All @@ -34,3 +47,18 @@
# EXPORT THE SIMULATED FINAL PLATE AS AN EXCEL SPREADSHEET
plate_to_content_spreadsheet(simulated_final_plate, "out_final_plate.xlsx")
# This records the contents, rather than the experimental units, for each well.


# EXPORT A PLATEMAP OF EXPERIMENTAL UNITS
def info_function(well):
if "expunit" in well.data:
return well.data["expunit"]
else:
return None


plate_to_platemap_spreadsheet(
dest_plate,
wellinfo_function=info_function,
filepath="out_final_plate_expunits.xlsx",
)
Binary file not shown.

0 comments on commit 5cc0599

Please sign in to comment.