VyLala commited on
Commit
64f5cf1
·
verified ·
1 Parent(s): 46054b9

Update mtdna_backend.py

Browse files
Files changed (1) hide show
  1. mtdna_backend.py +23 -10
mtdna_backend.py CHANGED
@@ -441,18 +441,31 @@ async def summarize_results(accession, stop_flag=None):
441
  sid = row["Sample ID"]
442
 
443
  # Row values in correct schema order
 
 
 
 
 
 
 
 
 
 
 
 
444
  row_values = [
445
- row.get("Sample ID", ""),
446
- row.get("Predicted Country", ""),
447
- row.get("Country Explanation", ""),
448
- row.get("Predicted Sample Type", ""),
449
- row.get("Sample Type Explanation", ""),
450
- row.get("Sources", ""),
451
- row.get("Query_cost", ""),
452
- row.get("Time cost", ""),
453
- row.get("file_chunk", ""),
454
- row.get("file_all_output", "")
455
  ]
 
456
 
457
  if sid in id_to_row:
458
  # ✅ Update existing row
 
441
  sid = row["Sample ID"]
442
 
443
  # Row values in correct schema order
444
+ # row_values = [
445
+ # row.get("Sample ID", ""),
446
+ # row.get("Predicted Country", ""),
447
+ # row.get("Country Explanation", ""),
448
+ # row.get("Predicted Sample Type", ""),
449
+ # row.get("Sample Type Explanation", ""),
450
+ # row.get("Sources", ""),
451
+ # row.get("Query_cost", ""),
452
+ # row.get("Time cost", ""),
453
+ # row.get("file_chunk", ""),
454
+ # row.get("file_all_output", "")
455
+ # ]
456
  row_values = [
457
+ truncate_cell(row.get("Sample ID", "")),
458
+ truncate_cell(row.get("Predicted Country", "")),
459
+ truncate_cell(row.get("Country Explanation", "")),
460
+ truncate_cell(row.get("Predicted Sample Type", "")),
461
+ truncate_cell(row.get("Sample Type Explanation", "")),
462
+ truncate_cell(row.get("Sources", "")),
463
+ truncate_cell(row.get("Query_cost", "")),
464
+ truncate_cell(row.get("Time cost", "")),
465
+ truncate_cell(row.get("file_chunk", "")),
466
+ truncate_cell(row.get("file_all_output", ""))
467
  ]
468
+
469
 
470
  if sid in id_to_row:
471
  # ✅ Update existing row