biothings_download_entrez_data_local
Download data from NCBI Entrez databases (e.g., nucleotide, protein) to a local file. Provide IDs, database, and format (fasta or gb) to save files on your machine.
Instructions
Download data from NCBI Entrez databases and save to local file.
Same as download_entrez_data but saves the result to a local file instead of returning the content.
This is useful for large downloads or when you want to persist the data.
**Parameters:**
- `ids` (List[str], required): A list of unique identifiers for the records to fetch
- `db` (DB_LITERAL, required): The target NCBI Entrez database
- `reftype` (Literal["fasta", "gb"], required): The desired format for the downloaded data
- `output_path` (Optional[str]): Custom output path. If None, generates unique filename
**Returns:**
LocalFileResult containing:
- `path`: Path to the saved file
- `format`: File format used
- `success`: Whether the operation succeeded
- `error`: Error message if failed
**Example Usage:**
```
download_entrez_data_local(
ids=["NM_000546.6"],
db="nucleotide",
reftype="fasta",
output_path="tp53_sequence.fasta"
)
```
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | Yes | ||
| ids | Yes | ||
| reftype | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||