Skip to content

Commit 5cc0599

Browse files
committed
Export a platemap in the doe example
1 parent 85ee20d commit 5cc0599

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

examples/doe_example/doe_example.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
from plateo.parsers import plate_from_content_spreadsheet
2-
from plateo.applications.doe import (import_valuetable_from_csv, convert_valuetable_to_volumetable, convert_volumetable_to_actiontable)
2+
from plateo.applications.doe import (
3+
import_valuetable_from_csv,
4+
convert_valuetable_to_volumetable,
5+
convert_volumetable_to_actiontable,
6+
)
37
from plateo.containers import Plate96
48
from plateo.parsers.picklist_from_tables import picklist_from_dataframe
5-
from plateo.exporters import (picklist_to_tecan_evo_picklist_file, plate_to_content_spreadsheet)
9+
from plateo.exporters import (
10+
picklist_to_tecan_evo_picklist_file,
11+
plate_to_content_spreadsheet,
12+
plate_to_platemap_spreadsheet,
13+
)
614

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

2634
# CREATE PICKLIST THEN EXPORT IT AS A TECAN (GEMINI) WORKLIST
27-
picklist = picklist_from_dataframe(dataframe=actiontable, source_plates=[source_plate], dest_plates=[dest_plate], df_columns=None)
35+
picklist = picklist_from_dataframe(
36+
dataframe=actiontable,
37+
source_plates=[source_plate],
38+
dest_plates=[dest_plate],
39+
df_columns=None,
40+
)
2841
picklist_to_tecan_evo_picklist_file(picklist, "out_tecan_picklist.gwl")
2942

3043
# SIMULATE THE PICKLIST
@@ -34,3 +47,18 @@
3447
# EXPORT THE SIMULATED FINAL PLATE AS AN EXCEL SPREADSHEET
3548
plate_to_content_spreadsheet(simulated_final_plate, "out_final_plate.xlsx")
3649
# This records the contents, rather than the experimental units, for each well.
50+
51+
52+
# EXPORT A PLATEMAP OF EXPERIMENTAL UNITS
53+
def info_function(well):
54+
if "expunit" in well.data:
55+
return well.data["expunit"]
56+
else:
57+
return None
58+
59+
60+
plate_to_platemap_spreadsheet(
61+
dest_plate,
62+
wellinfo_function=info_function,
63+
filepath="out_final_plate_expunits.xlsx",
64+
)
5.28 KB
Binary file not shown.

0 commit comments

Comments
 (0)