Skip to main content

Bioinformatics datasets and tools

Project description

$${\Huge{\textbf{\textsf{\color{#2E8B57}Bio\color{#4682B4}sets}}}}$$

Build GitHub Documentation GitHub release Contributor Covenant DOI

Biosets is a specialized library that extends 🤗 Datasets for bioinformatics data, providing the following main features:

  • Bioinformatics Specialization: Streamlines data management specific to bioinformatics, such as handling samples, features, batches, and associated metadata.
  • Automatic Column Detection: Infers sample, batch, input features, and target columns, simplifying downstream preprocessing.
  • Custom Data Classes: Leverages specialized data classes (ValueWithMetadata, Sample, Batch, RegressionTarget, etc.) to manage metadata-rich bioinformatics data.
  • Polars Integration: Optional Polars integration enables high-performance data manipulation, ideal for large datasets.
  • Flexible Task Support: Native support for binary classification, multiclass classification, multiclass-to-binary classification, and regression, adapting to diverse bioinformatics tasks.
  • Integration with 🤗 Datasets: load_dataset function supports loading various bioinformatics formats like CSV, JSON, NPZ, and more, including metadata integration.
  • Arrow File Caching: Uses Apache Arrow for efficient on-disk caching, enabling fast access to large datasets without memory limitations.

Biosets helps bioinformatics researchers focus on analysis rather than data handling, with seamless compatibility with 🤗 Datasets.

Installation

With pip

You can install Biosets from PyPI:

pip install biosets

With conda

Install Biosets via conda:

conda install -c patrico49 biosets

Usage

Biosets provides a straightforward API for handling bioinformatics datasets with integrated metadata management. Here's a quick example:

from biosets import load_biodata

bio_data = load_dataset(
    data_files="data_with_samples.csv",
    sample_metadata_files="sample_metadata.csv",
    feature_metadata_files="feature_metadata.csv",
    target_column="metadata1",
    experiment_type="metagenomics",
    batch_column="batch",
    sample_column="sample",
    metadata_columns=["metadata1", "metadata2"],
    drop_samples=False
)["train"]

For further details, check the advance usage documentation.

Main Differences Between Biosets and 🤗 Datasets

  • Bioinformatics Focus: While 🤗 Datasets is a general-purpose library, Biosets is tailored for the bioinformatics domain.
  • Seamless Metadata Integration: Biosets is built for datasets with metadata dependencies, like sample and feature metadata.
  • Automatic Column Detection: Reduces preprocessing time with automatic inference of sample, batch, feature, and label columns.
  • Specialized Data Classes: Biosets introduces custom classes (e.g., Sample, Batch, ValueWithMetadata) to enable richer data representation.

Disclaimers

Biosets may run Python code from custom datasets scripts to handle specific data formats. For security, users should:

  • Inspect dataset scripts prior to execution.
  • Use pinned versions for any repository dependencies.

If you manage a dataset and wish to update or remove it, please open a discussion or pull request on the Community tab of 🤗's datasets page.

BibTeX

If you'd like to cite Biosets, please use the following:

@misc{smyth2024biosets,
    title = {psmyth94/biosets: 1.1.0},
    author = {Patrick Smyth},
    year = {2024},
    url = {https://github.com/psmyth94/biosets},
    note = {A library designed to support bioinformatics data with custom features, metadata integration, and compatibility with 🤗 Datasets.}
}

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

biosets-1.2.0.tar.gz (81.2 kB view details)

Uploaded Source

Built Distribution

biosets-1.2.0-py3-none-any.whl (90.2 kB view details)

Uploaded Python 3

File details

Details for the file biosets-1.2.0.tar.gz.

File metadata

  • Download URL: biosets-1.2.0.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for biosets-1.2.0.tar.gz
Algorithm Hash digest
SHA256 51d661ed59be26c5cb2fbe6b3b565cbcc355b6f7bef627796ad84e86ed3ae044
MD5 5262aaec23c6ce8def7c81f11ca7dd93
BLAKE2b-256 7090c024f518b39b6b337fcaf7663775f8ed13d49903a9d0b582c1d8401d4d3b

See more details on using hashes here.

File details

Details for the file biosets-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: biosets-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 90.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for biosets-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc7d5061951238cf2e20b50aabff7d17f9096c757f208328c22833ebf0f4a1c4
MD5 3af36b96caf185fbfdfe58a51d692de6
BLAKE2b-256 910a3dabcabee917772ea9070534ce3bc5c191d7ffdb2aaeea5298293e67fa4b

See more details on using hashes here.

Supported by

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