FASTA Line Width Audit
Audit wrapping of nucleotide or protein FASTA records at a caller-supplied width, allowing a shorter final sequence line.
Description
FASTA wraps sequence records after identifier lines.
FASTA wraps sequence records after identifier lines. A shorter final line can conform to a chosen wrapping width even when interior lines must be exact.1
Audit wrapping of nucleotide or protein FASTA records at a caller-supplied width, allowing a shorter final sequence line.
When to use FASTA Line Width Audit
Use this for the following task: Audit wrapping of nucleotide or protein FASTA records at a caller-supplied width, allowing a shorter final sequence line.
Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
How to use FASTA Line Width Audit and understand its results
- Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
- Enter fasta, expectedWidth using the field table, then run the tool.
- Read recordCount, nonterminalWidthViolations, terminalWidthViolations, consistent. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| fasta | Fasta | string; minimum text length 1; maximum text length 1000000 | Required |
| expectedWidth | Expected width | integer; minimum 1 | Required |
Skip blank lines, require nonempty > identifiers and supported nucleotide/protein-style sequence lines after headers. Check interior line lengths equal expectedWidth and final lines do not exceed it.2
consistent = nonterminalWidthViolations + terminalWidthViolations == 0 This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| recordCount | Record count | integer |
| nonterminalWidthViolations | Nonterminal width violations | integer |
| terminalWidthViolations | Terminal width violations | integer |
| consistent | Consistent | boolean |
{
"input": {
"fasta": ">a\nACGT\nAC\n>b\nTGCA\n",
"expectedWidth": 4
},
"output": {
"recordCount": 2,
"nonterminalWidthViolations": 0,
"terminalWidthViolations": 0,
"consistent": true
}
} Limitations and assumptions
The supported alphabet is broad letters plus *, dot and dash. This does not validate biological symbols or impose one universal FASTA line width.
The tool operates on supplied local data; alignment, filtering and annotation must already be appropriate for the stated calculation. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose GFF3 Feature Tally for this operation: Tally GFF3 feature types while respecting comments and the embedded FASTA boundary. For a complementary task, use VCF Header Audit for this operation: Audit VCF fileformat, column header, optional contig declarations, and sample identifiers.
Further background: Background specification: FASTA Line Width Audit.
References
-
FASTA Line Width Audit — tool.io
Similar or alternative tools
- GFF3 Feature Tally
Tally GFF3 feature types while respecting comments and the embedded FASTA boundary.
- VCF Header Audit
Audit VCF fileformat, column header, optional contig declarations, and sample identifiers.