chore: 初始版本提交 - 简化架构 + 轮询改造
- 移除 Motia Streams 实时通信,改用 3 秒轮询 - 简化前端代码,移除冗余组件 - 简化后端架构,准备 FastAPI 重构 - 更新 pixi.toml 环境配置 - 保留 bttoxin_digger_v5_repro 作为参考文档 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -397,7 +397,7 @@ def compute_similarity_weight(identity: float, coverage: float, hmm: bool) -> fl
|
||||
|
||||
|
||||
def parse_all_toxins(tsv_path: Path) -> pd.DataFrame:
|
||||
df = pd.read_csv(tsv_path, sep="\t", dtype=str, low_memory=False)
|
||||
df = pd.read_csv(tsv_path, sep="\t", dtype=str, engine="python")
|
||||
# Coerce needed fields
|
||||
for col in ["Identity", "Aln_length", "Hit_length"]:
|
||||
df[col] = pd.to_numeric(df[col], errors="coerce")
|
||||
@@ -658,7 +658,13 @@ def main():
|
||||
d = index.orders_for_name_or_backoff(fam)
|
||||
return bool(d)
|
||||
df = df[df.apply(_has_index_orders, axis=1)]
|
||||
strains = sorted(df["Strain"].astype(str).unique().tolist())
|
||||
|
||||
# Handle empty DataFrame - preserve columns and create empty outputs
|
||||
if df.shape[0] == 0:
|
||||
print("[Shotter] No hits passed filters, creating empty output files")
|
||||
strains: List[str] = []
|
||||
else:
|
||||
strains = sorted(df["Strain"].astype(str).unique().tolist())
|
||||
|
||||
all_hits: List[ToxinHit] = []
|
||||
all_strain_scores: List[StrainScores] = []
|
||||
|
||||
Reference in New Issue
Block a user