bb_get_fasta_id - ampinzonv/BB3 GitHub Wiki
bb_get_fasta_id
Function: Extract sequence IDs from FASTA headers (first word after '>').
๐ Description
This function extracts the unique identifiers (IDs) from FASTA headers. It captures only the first word after the >
character in each header line.
๐ฅ Input
- A FASTA file with one or more entries.
- Accepts input from STDIN using
--input -
.
๐ค Output
- List of FASTA sequence IDs (without the
>
symbol), one per line.
๐งช Examples
Extract IDs from a file:
bb_get_fasta_id --input sequences.fasta
Using STDIN:
cat sequences.fasta | bb_get_fasta_id --input -
Save to file:
bb_get_fasta_id --input sequences.fasta --outfile ids.txt
โ๏ธ Usage
bb_get_fasta_id --input FILE [--outfile FILE] [--quiet] [--force]
๐งต Options
Option | Description |
---|---|
--input FILE |
Input FASTA file or - for STDIN (required) |
--outfile FILE |
Output file path (optional, default: STDOUT) |
--quiet |
Suppress log messages |
--force |
Overwrite existing output file |
๐ Notes
- The ID is the first space-separated token after the
>
symbol in each header.