Table of contents
- Scientific introduction
- Test progress
- Demo user request
- Demo data
- Installation and commands
- Results and artifacts
- Interpreting identity and similarity
- Reproducibility
- Limitations
- References
- Try this workflow
Two protein sequences that differ at only one residue can be compared in several scientifically distinct ways. A global alignment asks how well the complete sequences correspond from end to end, whereas a local alignment asks for the best matching subsequences. Format conversion is a separate operation: it should preserve the biological sequence while changing its representation. This validated workflow uses EMBOSS 6.6.0 to exercise all three operations. seqret converts a 58-residue FASTA record to Swiss-Prot text, Needle produces a complete global alignment, and Water produces a local alignment. Both alignments report 57 identical residues out of 58, or 98.3% identity, and 58 similar residues out of 58, or 100.0% similarity.
The agreement is expected for this deliberately simple fixture, but it is not assumed merely because the sequences look alike. The complete native Needle and Water reports are retained and independently parsed. The converted Swiss-Prot record is reopened and checked for its ID, SQ, terminator, and unchanged length. A JSON summary records the package version and links every numerical statement to a deliverable. This makes the example useful both as an alignment tutorial and as a model for testing command-line bioinformatics without accepting “the file exists” as scientific evidence.
Scientific introduction
Sequence alignment places residues from two or more biological sequences into corresponding columns. The operation is fundamental to homology analysis, annotation transfer, variant interpretation, domain detection, phylogenetics, and structural comparison, but an alignment is a model rather than a direct experimental observation. Its result depends on the objective function, substitution matrix, gap penalties, terminal-gap treatment, alphabet, and whether the algorithm is global or local. A high score under one configuration cannot be compared casually with a score produced by another matrix or penalty scheme.
Protein alignment differs from character matching because amino-acid substitutions have unequal biological plausibility. Substitution matrices summarize observed or modeled tendencies for one residue to replace another. EMBOSS Needle and Water use EBLOSUM62 by default in this test, so the conservative valine-to-isoleucine change at position 53 counts as similar even though it is not identical. That distinction explains why identity is 98.3% while similarity is 100.0%. Similarity is matrix-dependent and must never be reported without preserving the matrix.
Global alignment with Needle
Needle implements the Needleman–Wunsch dynamic-programming approach for end-to-end alignment. Conceptually, the algorithm fills a matrix whose cells represent the best score attainable for prefixes of the two sequences, considering a residue pairing or a gap. Traceback reconstructs an optimal path through that matrix. EMBOSS uses affine gap costs, separating the expense of opening a gap from extending one; the validated command used a gap-open penalty of 10.0 and a gap-extension penalty of 0.5.
A global alignment is appropriate when sequences are expected to correspond over their complete lengths, as with alleles, close orthologs, or two versions of the same construct. It can be misleading when one sequence contains only a domain of the other, when long unrelated flanks surround a conserved motif, or when assembly fragments are compared with full proteins. In such cases, forcing every terminal residue into the model may obscure the biologically relevant region.
The two fixtures have equal length and no insertions or deletions, so Needle aligns all 58 residues without gaps. The resulting score is 296.0. That score is meaningful only together with EBLOSUM62 and the recorded gap settings; it is not a percentage and not a universal distance. For communication across cases, identity, coverage, aligned length, and gap fraction are often easier to interpret, but the raw native score remains valuable for exact reproduction.
Local alignment with Water
Water implements Smith–Waterman local alignment. Dynamic programming is again used, but negative paths are reset so traceback begins and ends at the highest-scoring local region. The algorithm is designed to find strong subsequence correspondence even if the remaining sequence is unrelated. It is therefore useful for motifs, domains, fragments, or proteins with extra terminal regions.
For the present fixture, the best local region spans the complete sequences, so Water returns the same 58-residue extent and the same 57/58 identity as Needle. This does not make the algorithms interchangeable. A different input with long nonhomologous tails could cause Water to report a short high-identity segment while Needle reports lower identity across the full length. Any report of local identity must include aligned length and coverage; otherwise a perfect ten-residue motif could be mistaken for complete protein equivalence.
The local and global reports were required independently rather than deriving one from the other. Each native file states its program name, command line, matrix, gap penalties, aligned length, identity, similarity, gaps, score, and aligned residue blocks. The validator checks # Program: needle and # Program: water, preventing a copied or renamed file from passing both gates.
Sequence formats and seqret
FASTA is intentionally compact: a header beginning with > is followed by sequence lines. Swiss-Prot text is record-oriented and contains explicit fields. In this test, seqret writes an ID line, an SQ line containing sequence length and checksums, formatted residues, and the // record terminator. Conversion changes representation without changing the 58-residue protein.
Format conversion deserves validation because autodetection, alphabet selection, record selection, identifiers, line wrapping, and output options can change behavior. A converter that silently selects the wrong record, reverse-complements nucleic acid, truncates at an unexpected character, or writes an empty record has not succeeded. The validator therefore inspects structural markers and the terminal record delimiter instead of relying on the filename extension.
EMBOSS Uniform Sequence Addresses allow programs to describe inputs from files, databases, and other sources. That flexibility is useful but also means a reproducible command should retain the literal resolved paths and output format. The demonstration uses small tracked FASTA files so database releases, remote services, and authentication cannot change the result.
Test progress
| Gate | Status | Retained evidence |
|---|---|---|
| Exact package preflight | Passed | 46 packages; 237,588,584 planned bytes |
| Package installation | Passed and retained | EMBOSS 6.6.0 Linux x86_64 CPU environment |
| Native feature execution | Passed | Real seqret, needle, and water outputs |
| Natural-language execution | Passed on attempt 7 | Configured application agent and installed skill |
| Semantic artifact validation | Passed | Format markers, program identities, and 98.3% values |
| Focused application capture | Passed | Playwright capture of the result answer |
| Accelerator requirement | None | CUDA was not required or used |
The package archives occupy about 227 MB in the ignored per-skill download dossier. They are preserved so a developer can reproduce the installation or prepare a reviewed offline bundle. The installed environment remains under the managed application directory. A network reset during an earlier archive transfer exposed a weakness in the download loop; the runner now retains adjacent .part files, makes bounded retries, resumes with HTTP Range when supported, and verifies published SHA-256 values before promotion.
Attempts 4 through 6 also revealed an important distinction between scientific contracts and incidental JSON layout. The agent repeatedly produced correct native alignments and equivalent summaries, but an early validator demanded one exact nesting and one exact capitalization. The delivered instructions now define required concepts—program, alignment type, identity, files, and agreement—while the validator resolves those fields semantically. Numerical and native-file assertions remain strict.
Demo user request
Use the EMBOSS skill on the two supplied protein FASTA sequences. Convert the first sequence to Swiss-Prot format, run both Needle global alignment and Water local alignment, report identity for each, and preserve all native text outputs plus a JSON summary. Read
data/sequence-a.fastaanddata/sequence-b.fasta; save exact files asoutputs/sequence-a.swiss,outputs/needle.txt,outputs/water.txt, andoutputs/emboss-key-features.json. Do not replace EMBOSS with a custom parser or aligner.
The prompt describes an outcome rather than pasting a finished program. It identifies the scientific distinction between the two alignments, fixes the input and output contract, and prohibits a hand-written substitute. The executing agent must locate the installed package, run the native programs, reopen their results, calculate nothing by guesswork, and return deliverable paths.
Demo data
The tracked sequence A FASTA and sequence B FASTA each contain 58 amino acids. They differ at one position: sequence A contains valine where sequence B contains isoleucine. Both are hydrophobic branched-chain residues, which explains the conservative similarity call under EBLOSUM62.
| Input | Length | Role | Difference |
|---|---|---|---|
sequence-a.fasta | 58 aa | conversion and alignment reference | Valine at residue 53 |
sequence-b.fasta | 58 aa | alignment comparison | Isoleucine at residue 53 |
This is a deterministic software-control fixture, not evidence about a particular natural protein family. It is deliberately short enough for visual inspection while still exercising parsing, conversion, scoring, summary extraction, and structured export. Production studies should preserve accession, database release, organism, isoform, preprocessing, and provenance for every sequence.
Installation and commands
The exact Conda solve selected 46 packages totaling 237,588,584 bytes. The EMBOSS distribution was emboss-6.6.0-h0f19ade_14.conda, 164,925,045 bytes, with retained SHA-256 746cd172d76257431c018eae212f5429e67e67ada32e15acf08fd0750c1e4521. No compiler, root privilege, model checkpoint, or GPU was required on the validated host.
seqret -sequence data/sequence-a.fasta \
-outseq outputs/sequence-a.swiss -osformat2 swiss
needle -asequence data/sequence-a.fasta \
-bsequence data/sequence-b.fasta \
-gapopen 10.0 -gapextend 0.5 \
-outfile outputs/needle.txt
water -asequence data/sequence-a.fasta \
-bsequence data/sequence-b.fasta \
-gapopen 10.0 -gapextend 0.5 \
-outfile outputs/water.txt
These commands are shown for transparency and reproduction. The workflow described in the conclusion does not require the user to author them. Whatever interface launches the calculation, the native reports must remain the source of identity and similarity values.
Results and artifacts
| Result | Needle global | Water local |
|---|---|---|
| Aligned length | 58 | 58 |
| Identity | 57/58 (98.3%) | 57/58 (98.3%) |
| Similarity | 58/58 (100.0%) | 58/58 (100.0%) |
| Gaps | 0/58 (0.0%) | 0/58 (0.0%) |
| Matrix | EBLOSUM62 | EBLOSUM62 |
| Gap open / extension | 10.0 / 0.5 | 10.0 / 0.5 |
| Native score | 296.0 | 296.0 |



The first image is a focused result rendered inside the chat application, not a file explorer or raw JSON editor. The other images are generated directly from retained attempt-7 artifacts. Their sources, hashes, and generators are recorded in the screenshot and visual-asset manifests.
The Swiss-Prot output contains the expected 58 residues and closes with //. needle.txt and water.txt are complete native reports rather than reconstructed summaries. emboss-key-features.json records version 6.6.0.0 and the conversion/alignment relationships. The semantic validator independently parses the native identities and compares them with the JSON values.
Interpreting identity and similarity
Identity is the fraction of aligned columns containing exactly the same residue. It depends on the chosen aligned extent: local and global identity can differ even for the same inputs. Similarity counts substitutions that the selected matrix classifies favorably, so it is not a matrix-free property. Coverage describes how much of each sequence participates. A responsible interpretation reports all three concepts when they matter.
The 98.3% result supports the narrow claim that these two 58-residue fixtures differ by one conservative substitution. It does not prove functional equivalence, structural identity, shared organism, orthology, or identical biochemical behavior. A single change may affect catalysis, stability, trafficking, interaction specificity, or post-translational modification, depending on its location and context.
For database searches or large families, statistical significance and multiple-testing considerations become important. Pairwise alignment alone does not estimate the probability that a match arose by chance across a database. Likewise, choosing a matrix suited to close homologs can overvalue or undervalue relationships at another evolutionary distance. The present case validates deterministic pairwise operations, not remote-homology inference.
Reproducibility
Validation was performed on Linux x86_64 CPU with no NVIDIA device. The exact package plan, archive checksums, FASTA inputs, commands, native outputs, JSON summary, chat transcript, validator log, and screenshot provenance are retained. Package and skill installation are separate gates: copying the skill into context does not prove EMBOSS exists, and installing EMBOSS does not prove the requested functions work.
Reproduction should compare invariants rather than timestamps. EMBOSS native reports embed a run date and absolute command paths, so whole-file hashes may differ across locations even when scientific content is identical. The stable checks are sequence length, format records, program identity, matrix, penalties, aligned length, identities, similarities, gaps, and score for the unchanged fixture and version.
Cross-platform execution remains unverified. A macOS, Windows, ARM64, container, or newer package build must rerun the complete contract. Small formatting differences can be tolerated only if semantic parsing remains unambiguous; scientific values and program provenance cannot be waived.
Limitations
This example contains two short equal-length proteins, one substitution, no gaps, no ambiguous residues, and no terminal extensions. It does not test nucleotide alignment, reverse complements, translated alignment, multiple-sequence alignment, profiles, database indexing, very long sequences, low-complexity masking, alternative matrices, or custom gap sweeps. It also does not benchmark runtime or memory scaling.
The fixture makes global and local results identical, which is useful for a control but does not illustrate their most important difference. A complementary tutorial should include a conserved domain within unrelated flanks and report both sequence coverages. Another should introduce an indel so affine gap behavior becomes visible. Such extensions should become separate validated cases rather than changing this stable regression input.
No phylogenetic, structural, or functional conclusion is justified from this control alone. Experimental metadata and biological context remain necessary. The tested result is an exact statement about software behavior and supplied sequences.
References
- Rice, Longden, and Bleasby, EMBOSS: The European Molecular Biology Open Software Suite, Trends in Genetics (2000).
- EMBOSS seqret application documentation.
- EMBOSS Needle application documentation.
- EMBOSS Water application documentation.
- EMBOSS Quick Guide and command reference.
Try this workflow
MindPlot has built-in support for this EMBOSS workflow. You can try it at mindplot.ai or download the desktop version for a more integrated experience and stronger local-data privacy. Users do not need to write the commands shown above: the agent reads the installed workflow, writes and runs the appropriate script, validates native outputs, and presents the deliverables.