bb_get_fasta_length - ampinzonv/BB3 GitHub Wiki

Function: bb_get_fasta_length

Report sequence lengths from a FASTA file.


๐Ÿ” Description

This function calculates and reports the length of each sequence in a FASTA file. It prints the ID of each sequence along with its length.

๐Ÿ“ฅ Input

  • A FASTA file with biological sequences.
  • STDIN is supported via --input -.

๐Ÿ“ค Output

  • Two-column output: <ID> <LENGTH>, one line per sequence.

๐Ÿงช Examples

bb_get_fasta_length --input sequences.fasta
cat sequences.fasta | bb_get_fasta_length --input -
bb_get_fasta_length --input sequences.fasta --outfile lengths.tsv

โš™๏ธ Usage

bb_get_fasta_length --input FILE [--outfile FILE] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE Input FASTA file or - for STDIN (required)
--outfile FILE Path to output file (optional, default: STDOUT)
--quiet Suppress log messages
--force Overwrite output file if it exists

๐Ÿ“Œ Notes

  • Handles multi-line FASTA entries properly.
  • Output is compatible with other BioBASH tools expecting tabular formats.
โš ๏ธ **GitHub.com Fallback** โš ๏ธ