Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -422,13 +422,14 @@ with tab5:
|
|
| 422 |
|
| 423 |
return adjusted_sources, source_volumes
|
| 424 |
|
| 425 |
-
# Utility: Generate fixed-volume D source
|
| 426 |
-
def
|
| 427 |
d_source_volumes = {}
|
| 428 |
d_source_script = []
|
| 429 |
current_d_index = 1
|
| 430 |
|
| 431 |
-
for
|
|
|
|
| 432 |
current_d_well = f"D{current_d_index}"
|
| 433 |
|
| 434 |
if current_d_well not in d_source_volumes:
|
|
@@ -531,7 +532,7 @@ with tab5:
|
|
| 531 |
|
| 532 |
robot_script_32, source_volumes_32 = track_and_replace_source(source_wells_32, robot_script_32)
|
| 533 |
|
| 534 |
-
d_script, d_volumes =
|
| 535 |
full_robot_script = robot_script_32 + d_script
|
| 536 |
|
| 537 |
robot_script_32_df = pd.DataFrame(full_robot_script)
|
|
|
|
| 422 |
|
| 423 |
return adjusted_sources, source_volumes
|
| 424 |
|
| 425 |
+
# Utility: Generate fixed-volume D source to all sample wells
|
| 426 |
+
def generate_fixed_d_source_instructions_to_all_samples(n_samples, fixed_volume=16, volume_limit=170):
|
| 427 |
d_source_volumes = {}
|
| 428 |
d_source_script = []
|
| 429 |
current_d_index = 1
|
| 430 |
|
| 431 |
+
for i in range(n_samples):
|
| 432 |
+
dest = get_well_position(i + 1)
|
| 433 |
current_d_well = f"D{current_d_index}"
|
| 434 |
|
| 435 |
if current_d_well not in d_source_volumes:
|
|
|
|
| 532 |
|
| 533 |
robot_script_32, source_volumes_32 = track_and_replace_source(source_wells_32, robot_script_32)
|
| 534 |
|
| 535 |
+
d_script, d_volumes = generate_fixed_d_source_instructions_to_all_samples(len(df_32_robot))
|
| 536 |
full_robot_script = robot_script_32 + d_script
|
| 537 |
|
| 538 |
robot_script_32_df = pd.DataFrame(full_robot_script)
|