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.0.0.tar.gz (13.7 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.0.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flybasedownloads-4.0.0.tar.gz
Algorithm Hash digest
SHA256 d8e4e24ff6d2486beea2727d6512d3d7af48f86db49a8c184352bdb3aa6af130
MD5 4e111af5b38e13b44c022512a8e2a4c9
BLAKE2b-256 deb3455b57a015a1135d375319c7984f686a4fcb39213adc2f3f9e53bf807f08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flybasedownloads-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea7fc49ab8c85a523534717918c7ba5b411bb9544f39a852cf911fd3c21666b
MD5 6c68a567ff5a5af420d218dce30f638e
BLAKE2b-256 948e8587fecca3fe7d5934ccc1f9f9db2f164c90c59bb927af5ea8cf40812da0

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