bigtools

A high-performance BigWig and BigBed library in Rust

https://github.com/jackh726/bigtools

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

bigbed bigwig rust

Keywords from Contributors

mesh interactive
Last synced: 6 months ago · JSON representation ·

Repository

A high-performance BigWig and BigBed library in Rust

Basic Info
  • Host: GitHub
  • Owner: jackh726
  • License: mit
  • Language: Rust
  • Default Branch: master
  • Homepage:
  • Size: 11.8 MB
Statistics
  • Stars: 101
  • Watchers: 3
  • Forks: 8
  • Open Issues: 16
  • Releases: 25
Topics
bigbed bigwig rust
Created almost 7 years ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

Bigtools

License Paper Zenodo

Rust, CLI crates.io bigtools on Bioconda Rust Docs
Python PyPI pybigtools on Bioconda Python Docs

Bigtools is a library and associated tools for reading and writing bigwig and bigbed files.

The primary goals of the project are to be - Performant - Extensible - Modern

Performant

Bigtools uses async/await internally to allow for efficient, multi-core computation when possible. In addition, tools are optimized for minimal memory usage. See Benchmarks for more details.

Extensible

Bigtools is designed to be as modular as possible. This, in addition to the safety and reliability of Rust, allows both flexibility and correctness as a library. In addition, its extremely easy to quickly create new tools or binaries. A number of binaries are available that parallel related existing binaries from UCSC, with drop-in compatibility for the most common flags.

Modern

Bigtools is written in Rust and published to crates.io, so binaries can be installed with cargo install bigtools or it can be used as a library by simply including it in your cargo.toml.

Library

To use bigtools in your Rust project, add bigtools to your Cargo.toml or run:

sh cargo add bigtools

See the bigtools 🦀 Documentation.

Example

```rust,norun use bigtools::bbiread::BigWigRead;

let mut reader = BigWigRead::open("test.bigWig").unwrap(); let chr1 = reader.get_interval("chr1", 0, 10000).unwrap(); for interval in chr1 { println!("{:?}", interval); } ```

Binaries

The bigtools CLI binaries can be installed through crates.io or conda.

sh cargo install bigtools

sh conda install -c bioconda bigtools

Additionally, pre-built binaries can be downloaded through Github releases.

The following binaries are available:

|binary|description| | ---- | ----- | |bigtools|Provides access to multiple subcommands, including all below| |bedgraphtobigwig|Writes a bigWig from a given bedGraph file| |bedtobigbed|Writes a bigBed from a given bed file| |bigbedinfo|Shows info about a provided bigBed| |bigbedtobed|Writes a bed from the data in a bigBed| |bigwigaverageoverbed|Calculate statistics over the regions of a bed file using values from a bigWig| |bigwiginfo|Shows info about a provided bigWig| |bigwigmerge|Merges multiple bigWigs, outputting to either a new bigWig or a bedGraph| |bigwigtobedgraph|Writes a bedGraph from the data in a bigWig| |bigwigvaluesoverbed|Get the per-base values from a bigWig over the regions of a bed file using values|

Renaming the bigtools binary to any of the subcommands (case-insensitive) allows you to run that subcommand directly.

Python wrapper

The pybigtools package is a Python wrapper written using PyO3. It can be installed or used as a dependency either through PyPI or conda.

sh pip install pybigtools

sh conda install -c bioconda pybigtools

See the pybigtools 🐍 API Documentation.

How to build from source

In order to build the bigtools binaries, you can run

cargo build --release

and the binaries can be found in target/release/.

Otherwise, you can install the binaries from source by running

cargo install --path bigtools/

Building the python wheels for pybigtools requires maturin. To build the pybigtools wheel for installation (and install), you can run

maturin build --release -m pybigtools/Cargo.toml pip install target/wheels/pybigtools*.whl

or

maturin develop --release -m pybigtools/Cargo.toml

Benchmarks

Benchmarks are included in the ./bench directory. They require python to run.

Multiple tools are compared against the comparable UCSC tools. For completeness, both single-threaded and multi-threaded (when available) benchmarks are included. Multiple different configuration options are benchmarked across multiple replicates, but a summar is available in the table below:

How to cite

This repository contains contains a CITATION.cff file with citation information. Github allows you to get a citation in either APA or BibTeX format; this is available in "Cite this repository" under About.

Owner

  • Name: Jack Huey
  • Login: jackh726
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
type: software
title: Bigtools
license: MIT
repository-code: 'https://github.com/jackh726/bigtools'
message: >-
  If you use this software, please cite it using the
  metadata from this file.
authors:
  - given-names: Jack
    family-names: Huey
    orcid: "https://orcid.org/0000-0003-3463-7192"
abstract: >-
  Bigtools is a performant, extensible, and modern library for reading and writing BigWig and BigBed genomic data files, written in Rust. It also includes executable binaries for the command line as well as Python bindings.
keywords:
  - bigwig
  - bigbed
  - bbi
  - bioinformatics
  - genomics
  - kent
  - ucsc
  - rust
  - python
identifiers:
  - type: doi
    value: 10.5281/zenodo.10606493
    description: Zenodo
  - type: doi
    value: 10.1101/2024.02.06.579187
    description: bioRxiv preprint
  - type: doi
    value: 10.1093/bioinformatics/btae350
    description: Publication
preferred-citation:
  type: article
  title: "Bigtools: a high-performance BigWig and BigBed library in Rust"
  authors:
  - given-names: Jack
    family-names: Huey
    orcid: "https://orcid.org/0000-0003-3463-7192"
  - given-names: Nezar
    family-names: Abdennur
    orcid: "https://orcid.org/0000-0001-5814-0864"
  journal: Bioinformatics
  year: 2024
  doi: "10.1093/bioinformatics/btae350"
  url: https://doi.org/10.1093/bioinformatics/btae350

GitHub Events

Total
  • Create event: 10
  • Release event: 10
  • Issues event: 41
  • Watch event: 26
  • Delete event: 2
  • Issue comment event: 126
  • Push event: 50
  • Pull request review comment event: 1
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 3
Last Year
  • Create event: 10
  • Release event: 10
  • Issues event: 41
  • Watch event: 26
  • Delete event: 2
  • Issue comment event: 126
  • Push event: 50
  • Pull request review comment event: 1
  • Pull request review event: 4
  • Pull request event: 17
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 550
  • Total Committers: 7
  • Avg Commits per committer: 78.571
  • Development Distribution Score (DDS): 0.098
Past Year
  • Commits: 138
  • Committers: 4
  • Avg Commits per committer: 34.5
  • Development Distribution Score (DDS): 0.225
Top Committers
Name Email Commits
Jack Huey 3****6 496
Nezar Abdennur n****r@g****m 39
Gert Hulselmans g****s@k****e 9
Donald Campbell 1****r 3
dependabot[bot] 4****] 1
Peter Kerpedjiev p****v@g****m 1
Anders Pitman t****1@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 41
  • Total pull requests: 43
  • Average time to close issues: 3 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 18
  • Total pull request authors: 9
  • Average comments per issue: 2.93
  • Average comments per pull request: 1.16
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 25
  • Pull requests: 13
  • Average time to close issues: 28 days
  • Average time to close pull requests: about 19 hours
  • Issue authors: 15
  • Pull request authors: 4
  • Average comments per issue: 2.24
  • Average comments per pull request: 1.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ghuls (10)
  • jackh726 (6)
  • mrvollger (4)
  • donaldcampbelljr (3)
  • nvictus (3)
  • sergpolly (2)
  • stela2502 (2)
  • pkerpedjiev (1)
  • mtvector (1)
  • casblaauw (1)
  • nleroy917 (1)
  • maxgmarin (1)
  • dmalzl (1)
  • ypauling (1)
  • khoroshevskyi (1)
Pull Request Authors
  • nvictus (40)
  • ghuls (16)
  • jackh726 (4)
  • nleroy917 (2)
  • anderspitman (2)
  • donaldcampbelljr (1)
  • pkerpedjiev (1)
  • paul-sud (1)
  • dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Packages

  • Total packages: 2
  • Total downloads:
    • cargo 78,383 total
    • pypi 2,197 last-month
  • Total dependent packages: 5
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 2
crates.io: bigtools

A library and associated tools for reading and writing bigwigs and bigbeds

  • Versions: 30
  • Dependent Packages: 4
  • Dependent Repositories: 1
  • Downloads: 78,383 Total
Rankings
Dependent packages count: 9.2%
Downloads: 13.5%
Dependent repos count: 16.5%
Average: 18.1%
Stargazers count: 25.2%
Forks count: 26.3%
Maintainers (1)
Last synced: 6 months ago
pypi.org: pybigtools

Python bindings to the Bigtools Rust library for high-performance BigWig and BigBed I/O

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 2,197 Last month
Rankings
Dependent packages count: 9.9%
Average: 37.6%
Dependent repos count: 65.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v2 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • papeloto/action-zip v1 composite
  • shogo82148/actions-upload-release-asset v1 composite
Cargo.lock cargo
  • 131 dependencies
Cargo.toml cargo
  • rand 0.8 development
  • attohttpc 0.25
  • bincode 1.3
  • byteorder 1
  • byteordered 0.6.0
  • bytes 1.4.0
  • clap 3.2.0
  • crossbeam-channel 0.5
  • crossbeam-utils 0.8
  • futures 0.3.28
  • itertools 0.10
  • libdeflater 0.13
  • parking_lot 0.12.1
  • ryu 1.0
  • serde 1
  • tempfile 3
  • thiserror 1
  • ufmt 0.2
bigtools/Cargo.toml cargo
  • rand 0.8 development
  • attohttpc 0.25
  • bincode 1.3
  • byteorder 1
  • byteordered 0.6.0
  • bytes 1.4.0
  • clap 4.3
  • crossbeam-channel 0.5
  • crossbeam-utils 0.8
  • futures 0.3.28
  • itertools 0.10
  • libdeflater 0.13
  • ryu 1.0
  • serde 1
  • smallvec 1.11.2
  • tempfile 3
  • thiserror 1
  • tokio 1.34.0
  • ufmt 0.2
pybigtools/Cargo.lock cargo
  • 151 dependencies
pybigtools/Cargo.toml cargo
bench/Dockerfile docker
  • python 3.8.6 build
  • rust buster build
pybigtools/pyproject.toml pypi
  • numpy *
.github/workflows/release-python.yml actions
  • PyO3/maturin-action v1 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite