Skip to content

Realign functional-pass proteins before adding the reference - #1

Merged
murrellb merged 1 commit into
mainfrom
codex/fix-functional-protein-export
Oct 6, 2026
Merged

murrellb merged 1 commit into
mainfrom
codex/fix-functional-protein-export

Conversation

@murrellb

@murrellb murrellb commented Oct 6, 2026

Copy link
Copy Markdown
Member

Functional-pass FASTA exports reused the screening alignment, so rejected ORFs and the screening aligner's gap choices continued to shape the exported proteins.

Build a fresh bundled MAFFT 7.520 FFT-NS-2 alignment from only the ungapped, passing, reference-trimmed proteins, then add the ungapped translated reference with MAFFT --amino --add reference.fa passing-protein-alignment.fa. The sample alignment is the existing profile; the reference is the added sequence. Share arguments and sequence validation between browser and CLI, preserve terminal stop symbols, verify that reference addition preserves sample columns, and backtranslate gaps as complete codon triplets. Keep screening decisions and match annotations unchanged; avoid a second clipping that could remove terminal residues. Update the browser guide, README, methods, format documentation, and parity notes; rebuild the shipped CLI.

Validation:

  • Native C++ core and WASM reactor tests passed.
  • All 41 TypeScript tests and the CLI smoke test passed; type check and production build passed.
  • Full public nanopore demo rerun with 4 workers and deferred phylogeny: all filter decisions, variant identifiers, screening match scores, and ungapped nucleotide/protein sequences match the original run.
  • donor_1_REN retains 335 passes plus its reference; protein width falls from 898 to 873 columns. donor_3_REN falls from 947 to 925 columns with all 242 passes retained.
  • Nucleotide exports translate exactly to protein exports; Export all contains the corrected donor_1_REN FASTA.

The reported manual 869-column alignment is not reproduced exactly by bundled FFT-NS-2. Its MAFFT version and exact command/options are needed to resolve that remaining difference; the implementation preserves every input residue, including terminal stops. Existing saved projects keep their stored alignments until collapse/functional filtering is recomputed.

@murrellb
murrellb marked this pull request as ready for review October 6, 2026 12:52
@murrellb
murrellb merged commit 29b656f into main Oct 6, 2026
1 check passed
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.

1 participant