Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lh3/bedtk

A simple toolset for BED files (warning: CLI may change before bedtk becomes stable)
https://github.com/lh3/bedtk

bioinformatics

Last synced: 17 days ago
JSON representation

A simple toolset for BED files (warning: CLI may change before bedtk becomes stable)

Awesome Lists containing this project

README

        

## Getting Started

```sh
# compile and install
git clone https://github.com/lh3/bedtk
cd bedtk && make
# filter a BED or VCF file
./bedtk flt test/test-anno.bed.gz test/test-iso.bed.gz
./bedtk flt -v test/test-anno.bed.gz test/test-iso.bed.gz # non-overlapping lines
./bedtk flt -cw100 test/test-anno.bed.gz test/test-sub.vcf.gz # with a window
# intersect (no sorting needed; overlapping records allowed)
./bedtk isec test/test-anno.bed.gz test/test-iso.bed.gz
# compute the breadth of coverage
./bedtk cov test/test-anno.bed.gz test/test-iso.bed.gz
# sort a BED file
./bedtk sort test/test-iso.bed.gz
./bedtk sort -s test/chr_list.txt test/test-iso.bed.gz
# merge overlapping records (no sorting needed)
./bedtk merge test/test-anno.bed.gz
```

## Introduction

Bedtk is a set of simple tools to process BED files. It so far implements
intersection, subtraction, sorting, merging and computing the breadth of
coverage. Bedtk is not as versatile as [bedtools][bedtools] and never aims to
match the bedtools feature set. It instead focuses on performance. Bedtk
is several to tens of times faster and uses a fraction of memory. It also
provides a few convenient functions. For example, sorting, merging and
intersection can be done in one go without Unix pipes.

Bedtk is published in:
> Li H and Rong J (2021) Bedtk: finding interval overlap with implicit interval tree.
> *Bioinformatics*, **37**:1315-1316

[bedtools]: https://github.com/arq5x/bedtools2
[cr]: https://github.com/lh3/cgranges