fasta_lake.canonical#
fasta_lake.canonical
#
Canonical database management for FastaLake baseline comparisons.
Downloads and manages canonical SwissProt FASTAs for the baseline search that FastaLake is benchmarked against.
download_canonical
#
download_canonical(organism: str = 'human', output_dir: str | Path = '.', force: bool = False) -> Path
Download the latest canonical SwissProt FASTA for an organism.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organism
|
str
|
'human', 'mouse', or 'rat'. |
'human'
|
output_dir
|
path
|
Where to save the FASTA. |
'.'
|
force
|
bool
|
Re-download even if file exists. |
False
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the downloaded FASTA. |
Source code in fasta_lake/canonical.py
get_canonical
#
Get path to canonical FASTA, preferring local copy.
Does NOT download — returns None if not found locally. Use download_canonical() to fetch from UniProt.