Samtools is a mature, production-grade command-line toolkit for processing high-throughput sequencing alignment data in SAM, BAM, and CRAM formats. It provides dozens of subcommands covering the full NGS workflow: format conversion (view), sorting, indexing, duplicate marking (markdup), mate-pair fixing (fixmate), depth/coverage calculation, variant calling preparation (mpileup), consensus calling, amplicon analysis, and comprehensive statistics (stats/flagstat). The architecture is a single C binary built on the htslib library, with each subcommand implemented as a separate source file dispatched from bamtk.c. The codebase is well-structured with reusable abstractions for pileup iteration, BED interval indexing, temporary file management, and global option handling. It is actively maintained with extensive regression tests, cross-platform CI (Linux, macOS, Windows, FreeBSD, OpenBSD, Solaris), and a large user community in bioinformatics.
SortMeRNA is a bioinformatics application designed to filter ribosomal RNA (rRNA) sequences from metatranscriptomic or total RNA sequencing data. It employs a seed-and-extend alignment strategy using a burst trie index for efficient k-mer lookup and Smith-Waterman for alignment extension, coupled with statistical significance testing (E-value) to distinguish rRNA from non-rRNA reads. The tool processes input in parallel via a thread pool and supports both single-end and paired-end reads in FASTA/FASTQ format (including gzipped), producing aligned and non-aligned output files in multiple formats (FASTA, FASTQ, SAM, BLAST-like) along with optional OTU clustering and alignment reports. The application follows a modular architecture with distinct components for input handling (Readfeed), reference indexing (Index/IndexDB), parallel processing (Processor/ThreadPool), alignment computation, and output reporting (various Report* modules). Key features include a checkpoint/resume mechanism implemented using a RocksDB-based key-value store (KVDB) to enable recovery from interruptions, and a portable SIMD layer (SSE2NEON) that allows the same code to leverage vectorized instructions on both x86 and ARM architectures. The build system is managed by CMake with conda-based dependency handling, ensuring reproducibility across platforms. Despite its complexity due to the integration of multiple third-party libraries (zlib, RocksDB, BBHash, Parasail, ALP) and the need for careful version management, the project demonstrates active maintenance with recent commits and a structured release history. The codebase exhibits several well-crafted, reusable components such as the thread pool, KVDB wrapper, and SSE2NEON compatibility layer, which could be extracted for use in other projects with minimal modification. The tool is primarily used in microbiome and transcriptomics workflows for rRNA depletion, a critical preprocessing step in metatranscriptomic analysis.
The Genome Analysis Toolkit (GATK4) is a production-grade bioinformatics framework developed by the Broad Institute for variant discovery and genotyping in high-throughput sequencing data. It provides a comprehensive suite of command-line tools for germline and somatic variant calling (HaplotypeCaller, Mutect2), copy number variation analysis (GermlineCNVCaller), structural variant detection (FindBreakpointEvidenceSpark), functional annotation (Funcotator), base quality score recalibration (BQSR), and read processing. The architecture is built around a plugin-style engine with walker base classes (ReadWalker, VariantWalker, LocusWalker) that define traversal patterns over genomic data, with extensive use of Apache Spark for distributed execution on clusters and cloud platforms (GCS, HDFS). Key entry points include the `gatk` wrapper script and individual tool classes registered via the Barclay argument parser, with workflows orchestrated through WDL/Cromwell pipelines. External dependencies include htsjdk for BAM/VCF I/O, BWA for alignment, PyMC3 for Bayesian CNV modeling, and PyTorch for deep learning-based variant scoring. The codebase is heavily tested with unit and integration tests, and supports both local and cloud-based execution.
htsjdk is a comprehensive Java library for reading, writing, and manipulating high-throughput sequencing (HTS) data formats, including SAM, BAM, CRAM, VCF, BCF, FASTQ, FASTA, BED, and GFF3. It provides format-specific codecs, indexing (BAI, CRAI, CSI, Tabix, tribble), block-compressed I/O (BGZF with libdeflate acceleration), and a plugin-based codec registry (beta package). The library is used by major bioinformatics tools like Picard, GATK, and IGV. It includes extensive CRAM compression support (rANS, FQZComp, range coding, name tokenisation) and versioned codec implementations for CRAM 3.0/3.1 and VCF 4.0-4.3. The architecture follows a layered design: low-level I/O streams, format-specific readers/writers, and a higher-level plugin framework for content-type decoupling. While the codebase is actively maintained and well-tested, it contains some deprecated APIs, experimental beta code, and a few unimplemented code paths, reflecting its long evolution and breadth of format support.