dsrclib
Cross-platform memory profiler
Summary
| Latest Version | Unknown |
|---|---|
| License | GPL-2.0 |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install dsrclib
choosenim install dsrclib
git clone https://github.com/quadram-institute-bioscience/dsrclib
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| dsrclib | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/quadram-institute-bioscience/dsrclib |
|---|---|
| Homepage | https://github.com/quadram-institute-bioscience/dsrclib |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
dsrclib
Nim library for reading DSRC2 compressed FASTQ files.
Returns readfx-compatible FQRecord objects.
Installation
nimble install dsrclib
Usage
Reading DSRC files
import dsrclib
for rec in readDSRC("reads.fastq.dsrc"):
echo rec.name, "\t", rec.sequence.len
Writing DSRC files
Record-by-record (single-threaded):
var records: seq[FQRecord]
for rec in readDSRC("reads.fastq.dsrc"):
records.add(rec)
writeDSRC("output.dsrc", records)
File-to-file (multi-threaded, fast)
compressDSRC and decompressDSRC use DsrcModule internally, which runs a multi-threaded pipeline (reader, N worker threads, writer) for maximum throughput:
compressDSRC("reads.fastq", "reads.dsrc")
decompressDSRC("reads.dsrc", "reads.fastq")
Optional parameters:
# Limit to 4 threads (default: all available cores)
compressDSRC("reads.fastq", "reads.dsrc", threads = 4)
# Read FASTQ from stdin
compressDSRC("", "reads.dsrc", useStdIo = true)
# Write FASTQ to stdout
decompressDSRC("reads.dsrc", "", useStdIo = true)
Reading FASTQ files (plain or gzipped)
A readFastq iterator is provided for reading FASTQ files, with gzip and stdin support:
for rec in readFastq("reads.fastq.gz"):
echo rec.name
# Read from stdin
for rec in readFastq("-"):
echo rec.name
CLI examples
The example/ directory contains two command-line tools:
fastq2dsrc INPUT_FASTQ OUTPUT_DSRC— compress FASTQ to DSRC (supports plain, gzipped, and stdin via-)undsrc INPUT_DSRC [OUTPUT_FASTQ]— decompress DSRC to FASTQ (file or stdout)
License
GPL-2.0
(C) Quadram Institute Bioscience