-
Notifications
You must be signed in to change notification settings - Fork 9
feat(website): multi pathogen support: edit page: handle preprocessing-assigned segments #5200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(website): multi pathogen support: edit page: handle preprocessing-assigned segments #5200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies sequence upload functionality to support multi-pathogen organisms by removing automatic segment assignment and instead allowing dynamic addition of sequence segments. The change shifts segment assignment responsibility to the preprocessing pipeline while providing a more flexible interface for uploading sequences.
Key changes:
- Replaced fixed segment names with dynamic sequence enumeration ("Segment 1", "Segment 2", etc.)
- Moved
EditableSequencesclass to its own file with improved multi-segment support - Updated test interfaces to use arrays instead of key-value pairs for sequence data
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/pages/[organism]/submission/edit/[accession]/[version].astro | Updated to pass full reference genome schema instead of just segment names |
| website/src/components/Edit/EditableSequences.ts | New file containing refactored EditableSequences class with dynamic segment support |
| website/src/components/Edit/SequencesForm.tsx | Removed EditableSequences class and updated UI to use dynamic labels |
| website/src/components/Submission/FormOrUploadWrapper.tsx | Updated to use new EditableSequences constructor |
| integration-tests/tests/pages/submission.page.ts | Changed sequence data interface from object to array |
| Multiple test files | Updated to use array-based sequence data instead of key-value pairs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
This is now targeted to a feature branch where we can merge with red tests to gather changes there until the integration tests are green again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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 👍.
|
Thanks for getting this started! I’ve started reviewing and wanted to flag something we discussed earlier — we had agreed to use the FASTA header as the sequence name shown on the edit page, since it also needs to be passed to the preprocessing pipeline and used in the user-facing error/warning messages. It looks like we’re shifting from records to a set of sequences here, and I’m wondering if that change might require refactoring back to records in order to properly use the FASTA header. Could you clarify the plan for that? |
On the website there is not restriction regarding that in those changes. We have a "sequence label" around that we use as the FASTA header when submitting and as the object keys when posting edited data. It's still an object. The only obstacle is that we currently don't get the FASTA header from a file that a user uploads, since the function there only yields a string which contains the sequence (without the header). But we can change that in a follow up PR. Until then, I implemented it such that it simply enumerates the sequences. |
eb49c79 to
8aaec9d
Compare
8aaec9d to
0129a69
Compare
45bdaa6 to
520c6cd
Compare
|
When I delete and then reupload a segment in the EVs I get an error: |
|
I started reviewing but decided it was easiest to start #5382 with my suggestions :-) |
|
Part of #5382 now. |
resolves #4999
Change the sequence upload on the edit page and on the "Submit single sequence" page such that it doesn't assign segments anymore. This should happen in the preprocessing pipeline (#4847).
If we have original data on the edit page, then the segment name is taken from there. In all other cases, we simply enumerate them ("Segment 1", "Segment 2", etc.). That will also be part of the fasta header when submitting / the segment name when uploading edited data.
Screenshot
CCHF "Submit single sequence" (
/cchf/submission/2/submit?inputMode=form)Screencast.from.2025-10-08.13-23-25.mp4
CCHF Edit page for a sequence entry that only has one segment in its original data:
Screencast.from.2025-10-08.13-28-09.mp4
For EV this is rather boring. Either it has a sequence:

Or it doesn't:

PR Checklist
🚀 Preview: Add
previewlabel to enable