You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-10Lines changed: 34 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,40 @@ A command-line utility for working with BINSEQ files.
8
8
## Overview
9
9
10
10
bqtools provides tools to encode, decode, manipulate, and analyze [BINSEQ](https://github.com/arcinstitute/binseq) files.
11
-
It supports both (`*.bq`) and (`*.vbq`) files and makes use of the [`binseq`](https://crates.io/crates/binseq) library.
11
+
It supports all BINSEQ variants (`*.bq`, `*.cbq`, `*.vbq`) and makes use of the [`binseq`](https://crates.io/crates/binseq) library.
12
12
13
13
BINSEQ is a binary file format family designed for high-performance processing of DNA sequences.
14
14
It currently has two variants: BQ and VBQ.
15
15
16
-
-**BQ (\*.bq)**: Optimized for _fixed-length_ DNA sequences **without** quality scores.
17
-
-**VBQ (\*.vbq)**: Optimized for _variable-length_ DNA sequences **with optional** quality scores.
16
+
-**BQ (\*.bq)**: Optimized for _fixed-length_ DNA sequences **without** quality scores (2bit/4bit).
17
+
-**VBQ (\*.vbq)**: Optimized for _variable-length_ DNA sequences **with optional** quality scores, headers with 2bit/4bit.
18
+
-**CBQ (\*.cbq)**: Optimized for _variable-length_ DNA sequences **with optional** quality scores, headers with 2bit + N.
18
19
19
-
Both support single and paired sequences and make use of two-bit or four-bit encoding for efficient nucleotide packing using [`bitnuc`](https://crates.io/crates/bitnuc) and efficient parallel FASTX processing using [`paraseq`](https://crates.io/crates/paraseq).
20
+
All support single and paired sequences and make use of two-bit or four-bit encoding for efficient nucleotide packing using [`bitnuc`](https://crates.io/crates/bitnuc) and efficient parallel FASTX processing using [`paraseq`](https://crates.io/crates/paraseq).
20
21
21
22
For more information about BINSEQ, see our [preprint](https://www.biorxiv.org/content/10.1101/2025.04.08.647863v1) where we describe the format family and its applications.
22
23
24
+
### Description of variants
25
+
26
+
> TL;DR: `*.cbq` is the recommended format for most applications.
27
+
28
+
For most applications the BINSEQ variant of choice is `*.cbq`.
29
+
This format is lossless by default and supports variable-length sequences.
30
+
It achieves better compression than `*.vbq` and `*.bq` by using blocked-columnar compression of sequence attributes.
31
+
It can optionally exclude quality scores and headers (but they are included by default).
32
+
For an overview of the format check out the [BINSEQ docs](https://docs.rs/binseq/latest/binseq/cbq/index.html).
33
+
34
+
If your application _only requires sequences_ and has _fixed-length_ reads then `*.bq` is the best choice.
35
+
It is the _fastest_ variant but _is lossy_ by design.
36
+
37
+
> Note: `*.vbq` was originally designed for variable-length sequences with quality scores and headers, but it is now deprecated in favor of `*.cbq` which is more compressable, lossless, and has faster decoding.
38
+
23
39
## Features
24
40
25
41
-**Encode**: Convert FASTA or FASTQ files to a BINSEQ format
26
42
-**Decode**: Convert a BINSEQ file back to FASTA, FASTQ, or TSV format
27
43
-**Cat**: Concatenate multiple BINSEQ files
28
-
-**Count**: Count records in a BINSEQ file
44
+
-**Info**: Show information and statistics about a BINSEQ file.
29
45
-**Grep**: Search for fixed-string, regex, or fuzzy matches in BINSEQ files.
30
46
-**Pipe**: Create named-pipes for efficient data processing with legacy tools that don't support BINSEQ.
0 commit comments