GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alejandrogzi/packbed: pack a .bed into overlapping components

BranchesTags
Open more actions menu

Latest commit

 

History

57 Commits
57 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
packbed
packbed
 
 
py-packbed
py-packbed
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

packbed

Version Badge Crates.io Version GitHub License Crates.io Total Downloads

pack a .bed into overlapping components

Features

  • pack any number of .bed files into overlapping components through the Rust library or Python package
  • automatically detect BED3, BED4, BED5, BED6, BED8, BED9, and BED12+ inputs
  • group overlaps by exon, CDS, or transcript boundaries
  • annotate inputs as reference or query records during packing
  • expose Python conversion of packed Rust components as dictionaries of GenePred objects

What's new on packbed v0.0.13!

  • Supports mixed BED widths
  • Adds a conversion-only Python package API

Usage

Binary

Usage: packbed [OPTIONS] --bed <PATHS>... --mode <MODE>...

Options:
    -b, --bed <PATHS>...       Paths to BED files delimited by comma
    -m, --mode <MODE>...       Mode for each BED file [R/r/reference or Q/q/query]
    -t, --threads <THREADS>    Number of threads
    --overlap_type <TYPE>      Type of overlap [default: exon] [possible values: exon, cds, bounds, boundary]
    -s, --subdirs <FLAG>       Flag reserved for splitting components into subdirectories
    -h, --help                 Print help
    -V, --version              Print version
packbed -b path/to/reference.bed,path/to/query.bed -m reference,query --overlap_type exon

Library

use std::path::PathBuf;

use packbed::{pack, OverlapType, Role};

fn main() -> Result<(), Box<dyn std::error::Error>> {

    let bed1 = PathBuf::from("/path/to/reference.bed");
    let bed2 = PathBuf::from("/path/to/query.bed");
    let beds = vec![bed1, bed2];
    let roles = vec![Role::Reference, Role::Query];

    let _comps = pack(beds, roles, OverlapType::Exon)?;

    Ok(())
}

Python

Install from PyPI once releases are published:

pip install py-packbed

Or build the local port during development:

git clone https://github.com/alejandrogzi/packbed.git && cd packbed/py-packbed
python -m venv .venv
source .venv/bin/activate
python -m pip install maturin
maturin develop --release

use it:

import packbed

beds = ["path/to/bed1.bed", "path/to/bed2.bed"]
roles = ["reference", "query"]
comps = packbed.pack(beds, roles, overlap_type="exon")

crate: https://crates.io/crates/packbed

Changelog

See assets/changelog/changelog.md for the full release history.

About

pack a .bed into overlapping components

Topics

bedbioinformaticsoverlappingtranscript

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.