|
1 | 1 | 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 | +) |
3 | 7 | from plateo.containers import Plate96
|
4 | 8 | 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 | +) |
6 | 14 |
|
7 | 15 | # READ THE SOURCE PLATE FROM A CONTENT SPREADSHEET
|
8 | 16 | source_plate = plate_from_content_spreadsheet("Source_Plate.xlsx")
|
|
24 | 32 | actiontable.head()
|
25 | 33 |
|
26 | 34 | # 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 | +) |
28 | 41 | picklist_to_tecan_evo_picklist_file(picklist, "out_tecan_picklist.gwl")
|
29 | 42 |
|
30 | 43 | # SIMULATE THE PICKLIST
|
|
34 | 47 | # EXPORT THE SIMULATED FINAL PLATE AS AN EXCEL SPREADSHEET
|
35 | 48 | plate_to_content_spreadsheet(simulated_final_plate, "out_final_plate.xlsx")
|
36 | 49 | # 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 | +) |
0 commit comments