PHPackages                             scienide/helix - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scienide/helix

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

scienide/helix
==============

A library for counting short DNA sequences for use in Bioinformatics.

115PHP

Since Jun 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Scien-ide/Helix)[ Packagist](https://packagist.org/packages/scienide/helix)[ RSS](/packages/scienide-helix/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Helix
=====

[](#helix)

A library for counting short DNA sequences for use in Bioinformatics. Helix consists of tools for data extraction as well as an ultra-low memory hash table called *DNA Hash* specialized for counting DNA sequences. DNA Hash stores sequence counts by their up2bit encoding - a two-way hash that exploits the fact that each DNA base need only 2 bits to be fully encoded. Accordingly, DNA Hash uses less memory than a lookup table that stores raw gene sequences. In addition, DNA Hash's layered Bloom filter eliminates the need to explicitly store counts for sequences that have only been seen once.

- **Ultra-low** memory footprint
- **Compatible** with FASTA and FASTQ formats
- **Supports** canonical sequence counting
- **Open-source** and free to use commercially

> **Note:** The maximum sequence length is platform dependent. On a 64-bit machine, the max length is 31. On a 32-bit machine, the max length is 15.

> **Note:** Due to the probabilistic nature of the Bloom filter, DNA Hash may over count sequences at a bounded rate.

Installation
------------

[](#installation)

Install into your project using [Composer](https://getcomposer.org/):

```
$ composer require scienide/helix
```

### Requirements

[](#requirements)

- [PHP](https://php.net/manual/en/install.php) 7.4 or above

Example
-------

[](#example)

```
use Helix\DNAHash;
use Helix\Extractors\FASTA;
use Helix\Tokenizers\Canonical;
use Helix\Tokenizers\Kmer;

$extractor = new FASTA('example.fa');

$tokenizer = new Canonical(new Kmer(25));

$hashTable = new DNAHash(0.001);

foreach ($extractor as $sequence) {
    $tokens = $tokenizer->tokenize($sequence);

    foreach ($tokens as $token) {
        $hashTable->increment($token);
    }
}

$top10 = $hashTable->top(10);

print_r($top10);
```

```
Array
(
    [GCTATAAAAAGAAAATTTTGGAATA] => 19
    [ATTCCAAAATTTTCTTTTTATAGCC] => 19
    [TAAAAAGAAAATTTTGGAATAAAAA] => 18
    [ATAAAAAGAAAATTTTGGAATAAAA] => 18
    [TATAAAAAGAAAATTTTGGAATAAA] => 18
    [CTATAAAAAGAAAATTTTGGAATAA] => 18
    [AAATAATTTCAATTTTCTATCTCAA] => 17
    [AAAATAATTTCAATTTTCTATCTCA] => 17
    [CAAAATAATTTCAATTTTCTATCTC] => 17
    [AGATAGAAAATTGAAATTATTTTGA] => 17
)

```

Testing
-------

[](#testing)

To run the unit tests:

```
$ composer test
```

Static Analysis
---------------

[](#static-analysis)

To run static code analysis:

```
$ composer analyze
```

Benchmarks
----------

[](#benchmarks)

To run the benchmarks:

```
$ composer benchmark
```

References
----------

[](#references)

- \[1\] .
- \[2\] P. Melsted et al. (2011). Efficient counting of k-mers in DNA sequences using a bloom filter.
- \[3\] S. Deorowicz et al. (2015). KMC 2: fast and resource-frugal k-mer counting.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/643b22cfe15a5f3ff42dc06ce98f1e5024b6e4578fc9627a058097f5046164d8?d=identicon)[andrewdalpino](/maintainers/andrewdalpino)

---

Top Contributors

[![andrewdalpino](https://avatars.githubusercontent.com/u/18690561?v=4)](https://github.com/andrewdalpino "andrewdalpino (17 commits)")

---

Tags

2bitbioinformaticsbloom-filtercanonicaldnadna-sequencesfastafastqk-merk-mer-countingphp

### Embed Badge

![Health badge](/badges/scienide-helix/health.svg)

```
[![Health](https://phpackages.com/badges/scienide-helix/health.svg)](https://phpackages.com/packages/scienide-helix)
```

###  Alternatives

[beyondit/opencart-extension-installer

Custom Composer Installer for installing OpenCart Extensions

1020.4k3](/packages/beyondit-opencart-extension-installer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
