[P1][Usability/Correctness] FASTAとGFFのseqid不一致を解析前に検出して具体例を表示する - #54
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f4e91c128
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if gff_contig not in gff_contigs: | ||
| examples = ", ".join(gff_contigs[:5]) or "(no feature rows)" | ||
| raise ValueError(f"Source contig '{payload['contig']}' (GFF name '{gff_contig}') has no features in '{source['name']}'. GFF seqids include: {examples}. FASTA and GFF sequence names must match.") |
There was a problem hiding this comment.
Continue without annotation instead of failing the job
When the selected FASTA contig legitimately has no GFF feature rows, this exception aborts the job before marker mapping or liftover, even though those evidence classes can still produce a valid result without synteny. The existing zero-gene path already represents this uncertainty, so emit an explicit annotation warning and continue rather than recording the entire job as failed.
AGENTS.md reference: AGENTS.md:L11-L12
Useful? React with 👍 / 👎.
| if line.startswith("#") or not line.strip(): | ||
| continue | ||
| seqid = line.split("\t", 1)[0] | ||
| if seqid not in seen: | ||
| seen.append(seqid) |
There was a problem hiding this comment.
Stop parsing when an embedded FASTA section begins
For a valid GFF3 containing a ##FASTA section, the directive is skipped as a comment but every following > header and sequence line is treated as a seqid. This produces false GFF-only mismatch warnings and, because distinct values are tracked with linear list membership, a large embedded genome can make this preflight consume enormous memory and quadratic time; stop at ##FASTA or only accept valid tab-delimited feature rows.
Useful? React with 👍 / 👎.
| gff_contigs = gff_seqids(source["gff"]) | ||
| if gff_contig not in gff_contigs: | ||
| examples = ", ".join(gff_contigs[:5]) or "(no feature rows)" | ||
| raise ValueError(f"Source contig '{payload['contig']}' (GFF name '{gff_contig}') has no features in '{source['name']}'. GFF seqids include: {examples}. FASTA and GFF sequence names must match.") |
There was a problem hiding this comment.
Localize the new seqid diagnostics
When the UI is Japanese, this exception is persisted by JobManager and rendered verbatim as job.error; the new consistency warning is likewise rendered directly from job.warnings. Since neither diagnostic has a Japanese representation or localization key, Japanese users now receive English-only user-facing messages; return structured/localized diagnostics or add both EN and JA variants.
AGENTS.md reference: AGENTS.md:L108-L110
Useful? React with 👍 / 👎.
# Conflicts: # backend/qtlift/pipeline.py # tests/test_pipeline.py
4f4e91c to
cdb4099
Compare
Fixes #49
実施内容
un_job(): 解析開始前にsource GFFのseqidを走査し
テスト
uff check\ パス