wenjun99 commited on
Commit
21c475f
·
verified ·
1 Parent(s): 08e57aa

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +7 -6
src/app.py CHANGED
@@ -226,8 +226,8 @@ with tab1:
226
  key="download_binary_txt"
227
  )
228
 
229
- # --- Output 2: Grouped Binary Matrix ---
230
- st.markdown("### Output 2 – Grouped Binary Matrix")
231
  groups = []
232
  for i in range(0, len(binary_labels), group_size):
233
  group = binary_labels[i:i + group_size]
@@ -237,6 +237,7 @@ with tab1:
237
 
238
  columns = [f"Position {i+1}" for i in range(group_size)]
239
  df = pd.DataFrame(groups, columns=columns)
 
240
  st.dataframe(df, use_container_width=True)
241
 
242
  st.download_button(
@@ -320,7 +321,7 @@ with tab3:
320
  Upload your sample file (Excel, CSV, or TXT) containing binary mutation data.
321
  The app will:
322
  - Auto-detect or create `Sample`, `Position#`, `Total edited`, and `Volume per "1"` columns
323
- - Let you set the **Desired total volume per sample (µL)** used to compute `Volume per "1"`
324
  - Calculate total demand per input and suggest a **uniform layout** (same # consecutive wells per input)
325
  - **Preview** the layout on a plate map (with tooltips)
326
  - After confirmation, generate pipetting commands and a source volume summary
@@ -468,16 +469,16 @@ with tab3:
468
 
469
  st.markdown("#### ⚙️ Volume Calculation Settings")
470
  default_total_vol = st.number_input(
471
- "Desired total volume per sample (µL)",
472
  min_value=1.0, max_value=10000.0, value=64.0, step=1.0,
473
- help="Used to compute Volume per '1' as (Desired total volume / Total edited) when not provided."
474
  )
475
 
476
  vol_candidates = [c for c in df.columns if "volume per" in c.lower()]
477
  if not vol_candidates:
478
  df['Volume per "1"'] = default_total_vol / df["Total edited"].replace(0, np.nan)
479
  df['Volume per "1"'] = df['Volume per "1"'].fillna(0)
480
- st.info(f'`Volume per "1"` column missing — calculated automatically as {default_total_vol:.0f} µL / Total edited.')
481
  volume_col = 'Volume per "1"'
482
  else:
483
  volume_col = vol_candidates[0]
 
226
  key="download_binary_txt"
227
  )
228
 
229
+ # --- Output 2: Binary matrix split into reactions grouped by target position ---
230
+ st.markdown("### Output 2 – Binary matrix split into reactions grouped by target position")
231
  groups = []
232
  for i in range(0, len(binary_labels), group_size):
233
  group = binary_labels[i:i + group_size]
 
237
 
238
  columns = [f"Position {i+1}" for i in range(group_size)]
239
  df = pd.DataFrame(groups, columns=columns)
240
+ df.insert(0, "Sample", range(1, len(df) + 1))
241
  st.dataframe(df, use_container_width=True)
242
 
243
  st.download_button(
 
321
  Upload your sample file (Excel, CSV, or TXT) containing binary mutation data.
322
  The app will:
323
  - Auto-detect or create `Sample`, `Position#`, `Total edited`, and `Volume per "1"` columns
324
+ - Let you set the **Maximum volume per input well (µL)** used to compute `Volume per "1"`
325
  - Calculate total demand per input and suggest a **uniform layout** (same # consecutive wells per input)
326
  - **Preview** the layout on a plate map (with tooltips)
327
  - After confirmation, generate pipetting commands and a source volume summary
 
469
 
470
  st.markdown("#### ⚙️ Volume Calculation Settings")
471
  default_total_vol = st.number_input(
472
+ "Maximum volume per input well (µL)",
473
  min_value=1.0, max_value=10000.0, value=64.0, step=1.0,
474
+ help="Used to compute Volume per '1' as (Maximum volume per input well / Total edited) when not provided."
475
  )
476
 
477
  vol_candidates = [c for c in df.columns if "volume per" in c.lower()]
478
  if not vol_candidates:
479
  df['Volume per "1"'] = default_total_vol / df["Total edited"].replace(0, np.nan)
480
  df['Volume per "1"'] = df['Volume per "1"'].fillna(0)
481
+ st.info(f'`Volume per "1"` column missing — calculated automatically as {default_total_vol:.0f} µL (max per input well) / Total edited.')
482
  volume_col = 'Volume per "1"'
483
  else:
484
  volume_col = vol_candidates[0]