Skip to main content

Unofficial Python client for downloading and exploring FlyBase datasets.

Project description

FlyBase Downloads (FBD)

FlyBase Downloads (FBD) is a lightweight Python library that provides programmatic access to selected datasets from FlyBase, allowing researchers to search, download, and load biological datasets directly into Python objects (e.g. pandas DataFrames) for analysis, exploration, and machine learning workflows.

Important: This is an unofficial library.
All data is retrieved directly from FlyBase, and availability depends entirely on FlyBase’s public resources.


Purpose

This library is designed for:

  • Academic and educational use
  • Bioinformatics analysis
  • Data exploration in Jupyter notebooks
  • Machine learning and data science pipelines

It is not intended for high-frequency or automated bulk downloading.


Installation and Import

pip install flybasedownloads
from FBD.fbd import FBD

Basic Usage

List available categories

fbd = FBD()
categories = fbd.get_categories()
print(categories)

List datasets by category

fbd = FBD()
files_by_cat = fbd.get_files_by_category("Genes")
print(files_by_cat)

Search for a dataset (exact or partial match)

Exact match

fbd = FBD()
dataset = fbd.search_file("gene_genetic_interactions")
print("Selected dataset:", dataset)

Partial matches

fbd = FBD()
matches = fbd.search_file("gene")
print("Possible datasets:")
for m in matches:
    print("-", m)

Download datasets

Initialize with a dataset and download directly

fbd = FBD("gene_genetic_interactions")
df = fbd.download_file()

Download multiple datasets sequentially

fbd = FBD()
fbd.set_dataset("antibody_information")
df1 = fbd.download_file()
fbd.set_dataset("gene_genetic_interactions")
df2 = fbd.download_file()

Dataset metadata

Retrieve column descriptions

column_info = fbd.get_column_descriptions(
    columns=[
        "Starting_gene(s)_symbol",
        "Ending_gene(s)_symbol",
        "Interaction_type"
    ]
)
print(column_info)

Example: preparing data for ML

X = df[[
    "Starting_gene(s)_symbol",
    "Ending_gene(s)_symbol"
]]

y = df["Interaction_type"]

Rate limiting & responsible use

To protect shared infrastructure and respect FlyBase resources, downloads are rate-limited by default. -The download limit is enforced internally -The library is intended for academic use only -Bulk or automated scraping is strongly discouraged

Advanced users can modify the download limits via the Config class and config.json, but: We strongly ask users NOT to bypass rate limits, as this project does not have the infrastructure to support large-scale or abusive usage.

Data source & disclaimer

-All datasets are retrieved directly from FlyBase -This library is not affiliated with FlyBase -Dataset availability may change over time -Some datasets may become unavailable or updated without notice

If you need guaranteed access or bulk data, please use FlyBase’s official distribution channels. Official FlyBase Downloads Overview: FlyBase:Downloads_Overview


Citation

If you use this library in academic work, please cite FlyBase as the original data source.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flybasedownloads-4.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flybasedownloads-4.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file flybasedownloads-4.1.0.tar.gz.

File metadata

  • Download URL: flybasedownloads-4.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for flybasedownloads-4.1.0.tar.gz
Algorithm Hash digest
SHA256 47e7870c7f77fb720105ecd5747aba28e026498b2057358fd83b9386d574bc71
MD5 b1876f85e5409211c4c763860bac3fc6
BLAKE2b-256 b3a58210e562eaa72f762e30b1303cb3285380cf1dab77152b9f2f9d2fc3e5de

See more details on using hashes here.

File details

Details for the file flybasedownloads-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flybasedownloads-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dab45ed5fcc789ab825a4ba6bce26579acc5b7850404778d9fdf179307fc99c0
MD5 9de191855a3d8268579a5227baab276a
BLAKE2b-256 a146b72712838fda5bc5990df3b8da021bee1f9eba3d0b2c7e0dc2126550e996

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page