bb_get_fasta_entry - ampinzonv/BB3 GitHub Wiki

Function: bb_get_fasta_entry

Extract one or more specific entries from a FASTA file using their IDs.


๐Ÿ” Description

This function searches a FASTA file and returns only the entries that match the given ID(s). It can take a single ID (--entry) or a file with one ID per line (--entry-file).

๐Ÿ“ฅ Input

  • FASTA file (or STDIN with --input -)
  • Single ID or file of IDs

๐Ÿ“ค Output

  • FASTA-formatted output with only the requested entries.

๐Ÿงช Examples

Extract one sequence:

bb_get_fasta_entry --input db.fasta --entry seq1

Extract multiple sequences:

bb_get_fasta_entry --input db.fasta --entry-file ids.txt

โš™๏ธ Usage

bb_get_fasta_entry --input FILE (--entry ID | --entry-file FILE) [--outfile FILE] [--quiet] [--force]

๐Ÿงต Options

Option Description
--input FILE FASTA file or - for STDIN (required)
--entry ID ID of a single entry to extract
--entry-file FILE File containing IDs to extract (one per line)
--outfile FILE Output file (default: STDOUT)
--quiet Suppress messages
--force Overwrite output file if it exists

๐Ÿ“Œ Notes

  • Either --entry or --entry-file must be provided, not both.
  • Useful for retrieving known sequences from a reference FASTA.