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

  1. Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
  2. Enter fasta, expectedWidth using the field table, then run the tool.
  3. Read recordCount, nonterminalWidthViolations, terminalWidthViolations, consistent. Interpret flags, units, ordering and placeholder values using the rules below.
  4. Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
Input fieldMeaningValue type and boundsRequirement
fastaFastastring; minimum text length 1; maximum text length 1000000Required
expectedWidthExpected widthinteger; minimum 1Required

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 fieldMeaningValue type
recordCountRecord countinteger
nonterminalWidthViolationsNonterminal width violationsinteger
terminalWidthViolationsTerminal width violationsinteger
consistentConsistentboolean
json
{
  "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

  1. Background specification: FASTA Line Width Audit — NCBI

  2. 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies