Skip to main content

BioDuck

A CLI tool for running SQL files against DuckDB and exploring data interactively.

Installation

pip install .

This will install the BioDuck CLI tool along with all included SQL files and resources.

Usage

Create a SQL File

bioduck create my_query

This creates a file ./sql/my_query.sql that you can edit with your SQL query.

Run a SQL File

bioduck run ./sql/my_query.sql

You can specify a database file:

bioduck run ./sql/my_query.sql --db my_database.duckdb

Save results to a CSV file:

bioduck run ./sql/my_query.sql --output results.csv

Launch the DuckDB UI

Run the DuckDB UI after initializing with SQL files:

bioduck ui

By default, it will run all SQL files in the ./sql directory in alphabetical order, then launch the DuckDB UI.

You can specify a different SQL directory:

bioduck ui --sql-dir ./my_queries

And a specific database file:

bioduck ui --db my_database.duckdb

Project Structure

  • Place your SQL files in the ./sql directory
  • SQL files are run in alphabetical order when using the ui command
  • You can use the create command to create new SQL files

NCBI Database

BioDuck includes built-in support for creating and managing NCBI biological data databases.

Creating an NCBI Database

bioduck ncbi

This will:

  1. Create a database at ~/.bioduck/ncbi.db (if it doesn't already exist)
  2. Initialize it with NCBI database schema and loaders for:
    • Taxonomy data
    • GenBank assembly data
    • RefSeq assembly data

The command will automatically:

  1. Download required files from NCBI FTP servers with progress indicators
  2. Extract necessary data from compressed archives
  3. Process and load the data into a DuckDB database
  4. Files are stored in ~/.bioduck/data by default for reuse

Accessing an Existing NCBI Database

If the database already exists, the command will simply report its location:

bioduck ncbi
# Database already exists at /home/user/.bioduck/ncbi.db

Launch UI for an NCBI Database

To open the DuckDB UI with your NCBI database:

bioduck ncbi --launch-ui
# or shorter form:
bioduck ncbi -u

Recreate Database

To force recreation of the database even if it exists:

bioduck ncbi --force

Specify Custom Locations

# Custom database location
bioduck ncbi --db-path /path/to/custom/ncbi.db

# Custom data directory for downloaded files
bioduck ncbi --data-dir /path/to/store/downloaded/data

Metadata

Release files for bioduck 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bioduck 0.1.0
File Size Uploaded Provenance Actions
bioduck-0.1.0.tar.gz 9.3 kB With provenance Details for bioduck-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bioduck 0.1.0
File Interpreter ABI Platform Actions
bioduck-0.1.0-py3-none-any.whl Python 3 none any Details for bioduck-0.1.0-py3-none-any.whl

Total release size: 20.5 kB

Release files / bioduck-0.1.0.tar.gz

Download URL bioduck-0.1.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
74e95105699f6ecadc87d9b318f68a01edce341082831faa938e4893b7993b4f
BLAKE2b-256 checksum
How to use checksums
e68f3664cc035ca437a24bda5cc7802813d12df95b27877a63690a2ea639785b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2025.

Transparency log

Release files / bioduck-0.1.0-py3-none-any.whl

Download URL bioduck-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e15645316474def0643ba489c9319922a16ad1b840caa841cfa5b6032205a62
BLAKE2b-256 checksum
How to use checksums
d9af35cc2c61adbe2e0b66f2868d1b341302d2c5896dd83114fb2861dcaf45dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2025.

Transparency log

Security for bioduck 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bioduck-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page