= Solution
Use \b[<local sequence alignment>], such as the <Smith-Waterman algorithm>, to compare the <globin> fragment with the matching region of each full-length target. A <global sequence alignment> would penalize long target flanks absent from the fragment. For a <linear gap penalty> the <dynamic programming> recurrence includes a restart option:
$$
H_{ij}=\max\{0,\ H_{i-1,j-1}+s(a_i,b_j),\ H_{i-1,j}-g,\ H_{i,j-1}-g\}.
$$
Initialize boundary entries to zero, start traceback at the largest entry anywhere, and stop at zero. If the entire query is known to be valid and must be retained, <fitting sequence alignment> is a suitable refinement: align the whole fragment while leaving target flanks unpenalized.
First check the sequence alphabet: the prompt calls the targets “genes”. If the <FASTA format> file contains <DNA> rather than <protein>, translate the relevant coding sequences into <amino acids> before a protein-to-protein <sequence alignment>. If coding frames are unknown, search translated frames. A file in <FASTA format> specifies storage syntax, not whether the contents are nucleotides or residues.
Back to article page