Forum:Tried building a compact sequence format with 4-bit storage
1
1
Entering edit mode
5 hours ago
Pranava ▴ 10

Hello everyone,

This is my first time posting here. My name is Pranava, and I wanted to share a small project I have been working on.

The idea is to explore whether DNA sequences can be stored in a more compact and efficient way. I started building a prototype that uses 4-bit storage for bases, which cuts down on space compared to traditional FASTA. On top of that, the format is designed to allow direct access to specific sequences without having to scan the entire file.

What I hope to achieve is a format that could:

  • make working with very large sequence collections faster and less memory-intensive,
    • provide a way to stream sequences in batches for machine learning workflows, and
    • serve as a more responsive backend for genome browsers and similar tools.

I know there are already established formats like BAM, CRAM, and UCSC 2bit, but I wanted to try building one myself to learn from the process and see if there are new angles worth exploring.

The project is still at an early stage, but here is the repository: https://github.com/Bit-2310/compact-on-demand-rapid-encoding-of-sequences

I would be very interested to hear your thoughts, feedback, or suggestions on whether something like this could be useful in practice, and what features you would consider important.

Thank you, Pranava

fasta open-source file-formats data-storage bioinformatics • 293 views
ADD COMMENT
1
Entering edit mode
2 hours ago

Hello Pranava,

Thanks for sharing your repository. Devising a new file format is an interesting undertaking and certainly a task with many devils in the details.

A few years ago, I had dreamed of writing an efficient converter to simplify the adoption of some of the existing compression formats, but ultimately this did go nowhere. But therefore, I had looked into existing formats and approaches, so I can share a few links for stuff that was already around back then:

You would probably need to benchmark your format against other formats like SRA, NAF, SFQ. Some relevant publications are e.g. those for LFastqC and using FPGA-accelerated LZMA for compression.

For working with genomic Data in Python, BioNumpy is neat, because it encodes genomic data as numeric arrays and processes it fast with Numpy. More recently a similar library that builds on Polars was released. Both have efficient internal representations of genomic data although not aiming to create a new file format. But they can certainly serve as inspiration, also with regard to the API.

Good luck and let us know when you think it is ready to be tested!

ADD COMMENT
0
Entering edit mode

Woah!!! Thank you very much, Matthias. I honestly didn't even know some of those existed and I will definitely go through them and try to understand what else I can do, while I try to get a job in this market :D

This is actually gonna be super helpful, it is greatly appreciated.

ADD REPLY

Login before adding your answer.

Traffic: 4758 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6