guohanghui commited on
Commit
130a70e
Β·
verified Β·
1 Parent(s): e7bc2ea

Update biopython/mcp_output/mcp_plugin/mcp_service.py

Browse files
biopython/mcp_output/mcp_plugin/mcp_service.py CHANGED
@@ -430,22 +430,22 @@ def blast_search(payload: dict):
430
 
431
  hits.append({
432
  "rank": idx + 1,
433
- "accession": alignment.accession,
434
- "hit_id": alignment.hit_id,
435
- "hit_def": alignment.hit_def,
436
- "length": alignment.length,
437
  "bit_score": float(hsp.bits),
438
  "evalue": float(hsp.expect),
439
- "identity_pct": round(identity_pct, 2),
440
- "identities": identities,
441
- "align_length": align_len
442
  })
443
  print("βœ…βœ…βœ…βœ…βœ…βœ…")
444
  result = {
445
- "query_length": len(sequence),
446
- "database": database,
447
- "program": program,
448
- "total_hits": len(hits),
449
  "hits": hits
450
  }
451
 
 
430
 
431
  hits.append({
432
  "rank": idx + 1,
433
+ "accession": str(alignment.accession),
434
+ "hit_id": str(alignment.hit_id),
435
+ "hit_def": str(alignment.hit_def),
436
+ "length": int(alignment.length),
437
  "bit_score": float(hsp.bits),
438
  "evalue": float(hsp.expect),
439
+ "identity_pct": float(round(identity_pct, 2)),
440
+ "identities": int(identities),
441
+ "align_length": int(align_len)
442
  })
443
  print("βœ…βœ…βœ…βœ…βœ…βœ…")
444
  result = {
445
+ "query_length": int(len(sequence)),
446
+ "database": str(database),
447
+ "program": str(program),
448
+ "total_hits": int(len(hits)),
449
  "hits": hits
450
  }
451