bb_get_fasta_entry - ampinzonv/BB3 GitHub Wiki
bb_get_fasta_entry
Function: 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.