This filter runs only after exact nucleotide collapse and is evaluated once per collapsed variant. It is never applied separately to the uncollapsed UMI-family consensuses. Sequences containing symbols outside A/C/G/T receive ambiguousSymbols-reject. The longest complete start-to-stop ORF across three frames is selected; a sequence with no such ORF receives noORF-reject and is not aligned.
Eligible collapsed ORFs are translated and aligned to one another as amino acids first. Before backtranslation, every row is checked against its exact input protein. Harmless alphabet normalization is restored onto the aligner’s gap path. If the aligner changed a row’s residue count, a deterministic anchor/profile fallback realigns every protein while proving that no residue was deleted or invented. That biological sample MSA is then frozen. The translated functional reference is added by affine sequence-to-profile alignment: query insertions add shared all-gap columns to the sample rows, but existing sample residues and their column relationships cannot move. Every amino-acid gap is projected back as exactly ---, so alignment cannot introduce a one- or two-base frameshift. The first returned row uses the actual header from the supplied functional-reference FASTA. If even the sequence-preserving fallback fails, the error and absence of functional calls are stored for that sample only; its collapse output, other samples, and later pipeline work continue.
The nucleotide alignment is sliced from the first through last non-gap nucleotide of the functional reference, which is retained as its first row. Query-only terminal sequence is excluded from exports and tree inference. Reference match is exact aligned nucleotide identity divided by the clipped alignment width; the existing three-significant-digit value controls functionalMatchThreshold, while the stored/displayed annotation is rounded to two decimal places. A passing variant keeps its complete collapsed identity and is labelled sample_vN_K rm=0.yy in functional FASTA/alignment outputs.
The screening nucleotide alignment is sliced from the first through last non-gap nucleotide of the functional reference. Query-only terminal sequence is excluded when constructing each variant’s trimmed coding sequence. Reference match is exact aligned nucleotide identity divided by the clipped screening width; the existing three-significant-digit value controls functionalMatchThreshold, while the stored/displayed annotation is rounded to two decimal places. A passing variant keeps its complete collapsed identity and is labelled sample_vN_K rm=0.yy in functional FASTA/alignment outputs. This annotation remains the screening score, rather than a score recalculated from the export layout.
After these decisions, all gaps are removed from the passing trimmed proteins and a fresh bundled MAFFT 7.520 FFT-NS-2 amino-acid alignment is built. Rejected ORFs cannot leave gap columns in this final sample profile. The ungapped translated reference is then added with MAFFT --amino --add reference.fa passing-protein-alignment.fa: the passing alignment is the existing profile and the reference is the new sequence. The reference is moved to row one for export; sample order and existing column relationships are checked. Stop symbols are restored after alignment, and all gaps are backtranslated as codon triplets. This final alignment is not clipped again: all residues of each already-trimmed passing protein and of the supplied reference are preserved, even where the reference has terminal gaps. Functional decisions and rm scores are unchanged by this realignment. Existing saved projects retain their stored alignments until collapse/functional filtering is recomputed. Alignment width can vary with MAFFT strategy/version; retaining terminal stop symbols can also differ from a standalone MAFFT run that drops them.