Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nucleotide-utils

Open source C++ utility library for working with nucleic acid sequences. Provides sequence inter/intramolecular interactions, ambiguous base matching, DNA motif searching, parsing/applying standard mutation notation, sequence normalization, and complements and reverse complements. Implemented as a small header and source file.

Description

nucleotide_utils is a open source C++ library providing core utilities for the manipulation and analysis of nucleic acid sequences. It is designed to support common sequence-level operations and standardized mutation handling without external dependencies.

The library includes functions for nucleic acid sequence normalization, base complementation, and reverse complementation. It supports ambiguous nucleotide codes using standard IUPAC conventions (e.g., N, R, Y, M, K) and provides matching and sequence-search functionality that accounts for these non-canonical bases.

In addition, nucleotide_utils implements parsing and application of mutations expressed in standard coding-sequence notation. Supported mutation types include substitutions, deletions, duplications, and insertions. The API allows both direct mutation of gene sequences and introspection of mutation properties, including the original sequence, the introduced sequence, and the zero-based index of the edit.

Next, in addition to sequence and mutation utilities, the library includes heuristic functions for assessing primer interactions (dimerization and hairpin formation). These routines estimate the likelihood of intermolecular dimerization and intramolecular hairpin formation based on complementary base pairing patterns, with emphasis on contiguous matches near 3' ends. The analysis is intended for screening and risk assessment rather than exact thermodynamic prediction.

The library is implemented as a small, self-contained header and source file pair, exposes a clean nucleotide namespace, and depends only on the C++ standard library. It is intended for reuse in bioinformatics, molecular biology, and sequence-processing tools.

Getting Started

nucleotide_utils is a header/source–only C++ utility library with no external dependencies.

1. Add the files to your project

Copy nucleotide_utils.hpp and nucleotide_utils.cpp into your project and ensure they are included in your build.

2. Include the header

#include <nucleotide/nucleotide_utils.hpp>

3. Use the nucleotide namespace

std::string seq = nucleotide::normalize("atg cta");
size_t pos = nucleotide::extract_mutation_position("c.123A>G");

Dependencies

The library depends only on the C++ standard library and is compatible with any modern C++ compiler.

Author

Chris Gudmundsen (2026)

Version History

  • 1.0
    • Initial Release

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Useful Links

About

Open source C++ utility library for working with nucleic acid sequences. Provides sequence inter/intramolecular interactions, ambiguous base matching, DNA motif searching, parsing/applying standard mutation notation, sequence normalization, and complements and reverse complements. Implemented as a small header and source file.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages