Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -384,6 +384,10 @@ with tab3:
|
|
| 384 |
|
| 385 |
# Global wells list long enough to cover allocation
|
| 386 |
global_wells = build_global_wells_list(plates_needed) # [(p, 'A1'), ...]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
global_wells = global_wells[:total_wells_needed_uniform] # exact length
|
| 388 |
|
| 389 |
# Assign blocks of size max_wells_per_source per input in order
|
|
@@ -460,7 +464,7 @@ with tab3:
|
|
| 460 |
source_volume_totals[(src_plate, src_well)] = source_volume_totals.get((src_plate, src_well), 0.0) + vol_per_one
|
| 461 |
|
| 462 |
commands.append({
|
| 463 |
-
"
|
| 464 |
"Source plate": src_plate,
|
| 465 |
"Source well": src_well,
|
| 466 |
"Destination plate": dest_plate,
|
|
@@ -473,7 +477,7 @@ with tab3:
|
|
| 473 |
commands_df = pd.DataFrame(commands).sort_values(
|
| 474 |
by=["Source plate", "Source well", "Destination plate", "Destination well"], kind="stable"
|
| 475 |
)
|
| 476 |
-
commands_df = commands_df[["
|
| 477 |
"Destination plate", "Destination well", "Volume", "Tool"]]
|
| 478 |
|
| 479 |
# Source summary (include allocated capacity per well)
|
|
|
|
| 384 |
|
| 385 |
# Global wells list long enough to cover allocation
|
| 386 |
global_wells = build_global_wells_list(plates_needed) # [(p, 'A1'), ...]
|
| 387 |
+
global_wells = sorted(
|
| 388 |
+
build_global_wells_list(plates_needed),
|
| 389 |
+
key=lambda x: (x[0], ROWS_96.index(x[1][0]), int(x[1][1:]))
|
| 390 |
+
)
|
| 391 |
global_wells = global_wells[:total_wells_needed_uniform] # exact length
|
| 392 |
|
| 393 |
# Assign blocks of size max_wells_per_source per input in order
|
|
|
|
| 464 |
source_volume_totals[(src_plate, src_well)] = source_volume_totals.get((src_plate, src_well), 0.0) + vol_per_one
|
| 465 |
|
| 466 |
commands.append({
|
| 467 |
+
"Input #": pos_idx,
|
| 468 |
"Source plate": src_plate,
|
| 469 |
"Source well": src_well,
|
| 470 |
"Destination plate": dest_plate,
|
|
|
|
| 477 |
commands_df = pd.DataFrame(commands).sort_values(
|
| 478 |
by=["Source plate", "Source well", "Destination plate", "Destination well"], kind="stable"
|
| 479 |
)
|
| 480 |
+
commands_df = commands_df[["Input #", "Source plate", "Source well",
|
| 481 |
"Destination plate", "Destination well", "Volume", "Tool"]]
|
| 482 |
|
| 483 |
# Source summary (include allocated capacity per well)
|