Skip to content

feat: single prediction sequence name for fasta#97

Merged
vtnphan merged 16 commits into
mainfrom
sbp-458-clean
Jul 8, 2026
Merged

feat: single prediction sequence name for fasta#97
vtnphan merged 16 commits into
mainfrom
sbp-458-clean

Conversation

@vtnphan

@vtnphan vtnphan commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

SBP-458 — Replaces auto-generated FASTA header IDs (e.g. pro_1) with a required, user-editable sequence name, tags each header with its molecule type (e.g. >seq1|protein), and adds a character-position ruler above the sequence input.

Changes

  • Added a required name field per entity row, validated (non-empty, no spaces/underscores, unique) via validateFastaHeader.
  • FASTA headers now use the user-entered name and append |type (ligand → smiles); removed the old getFastaSequenceId generator.
  • Submission payload entity id now uses the row name instead of entity_N.
  • Added a position ruler above the sequence textarea: shows the 1-based residue position above every 10th character and above the final character, with a wider gap after each group of 10 for readability. Implemented as a decorative overlay layer (getSequenceCells) behind a transparent, fully-editable textarea so native typing/selection/paste/scroll behaviour is preserved; scroll position is kept in sync via syncSequenceOverlayScroll.
  • Updated specs to cover the new field, validation, and header format.
  • Breaking: consumers relying on old pro_1/entity_N IDs need to account for user-supplied names and the |type suffix.
Screenshot 2026-07-08 at 12 14 42 pm Screenshot 2026-07-08 at 12 16 40 pm

How to Test

  1. Open Single Prediction — each entity row now shows a > name input; blank/spaced/underscored or duplicate names show a validation error.
  2. Set copy number > 1 and check generated FASTA headers look like >name_1|protein.
  3. Switch molecule type to Ligand (SMILES/CCD) and confirm the tag becomes |smiles / |ccd.
  4. Open the CCD dropdown and confirm it's no longer clipped.
  5. Type/paste a sequence longer than 10 characters and confirm position numbers appear above every 10th character and the last character, that wrapped lines keep labels attached to the correct row, and that typing/selecting/scrolling in the field still behaves like a normal textarea.
  6. npm test and npm run prettier:check pass.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added or updated documentation where necessary
  • I have run linting and unit tests locally
  • The code follows the project's style guidelines

@vtnphan vtnphan marked this pull request as ready for review July 7, 2026 01:18
@vtnphan vtnphan requested a review from minh-biocommons July 7, 2026 03:52

@minh-biocommons minh-biocommons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@vtnphan vtnphan merged commit f1c090c into main Jul 8, 2026
8 checks passed
@vtnphan vtnphan deleted the sbp-458-clean branch July 8, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants