Git Product home page Git Product logo

biocpp-core's Introduction

The BioC++ Core Library

This is the core library of the BioC++ project. It provides the following modules:

  • Alphabet: data structures that represent single biological compounds like DNA, RNA and amino acids.
  • Ranges: containers, views and utilities for storing and manipulating sequences of biological compounds.
  • Meta: metaprogramming utilities and auxilliary data structures.

The design of this module is heavily influenced by C++ Ranges and C++ Concepts. An introduction into the topic can be found here.

General information on the BioC++ project can be found in the main repository. The full documention (all BioC++ modules) can found here.

Attention: this library is currently a work-in-progress. Getting it into a stable state is of highest priority, but until then all kinds of changes are still possible.

Example

std::vector seq = "GATTACATATA"_dna4;
auto translated = seq | bio::views::translate;

fmt::print("The six protein frames of '{}' are:\n{}\n", seq, translated);
/*
The six protein frames of 'GATTACATATA' are:
[DYI, ITY, LHI, YM*, ICN, YVI]
 */

fmt::print("The third frame's second amino acid is: {}\n", translated[2][1]);
/*
The third frame's second amino acid is: H
 */

Here translated appears like a vector of protein sequences, however, it is actually a "view", i.e. a light-weight, lazy-evaluated data structure. Its elements are computed on-the-fly and occupy no memory. It still supports constant-time random access like a vector.

Easy to use

  • Header-only → just drop it in your source code or include it as a git submodule!
  • Zero dependencies → keep complexity low!
  • No build-system and no configure steps required.
  • Optional CMake support available.
  • Integrates well with the standard library, {fmt} and cereal.

State-of-the-art software engineering

  • C++20 with good forward compatibility.
  • GCC≥10 and Clang≥16 are supported.
  • No warnings on -Wall -Wextra -pedantic.
  • More than 97% code coverage.
  • Automatic code-formatting with clang_format.
  • Static analysis with clang_tidy.
  • Runtime analysis with ASAN and UBSAN.
  • No new or malloc in the entire codebase.

Quick-Setup

  • Clone the repository: git clone https://github.com/biocpp/biocpp-core.git
  • Add the include directory of BioC++, activate C++20 and you are good to go:
g++ -O3 -DNDEBUG -Wall -Wextra -std=c++20 -I /path/to/biocpp-core/include your_file.cpp
  • If you want to use {fmt}, add -I /path/to/fmt/include -D FMT_HEADER_ONLY=1.

biocpp-core's People

Contributors

clemapfel avatar cpockrandt avatar eldariont avatar eseiler avatar firstlovelife avatar h-2 avatar irallia avatar jensuweulrich avatar joergi-w avatar joshuak94 avatar jpfeuffer avatar kneubert avatar marehr avatar mariehoffmann avatar mitradarja avatar mr-c avatar pirovc avatar qpcr4vir avatar rrahn avatar sarahet avatar simonsasse avatar smehringer avatar svnbgnk avatar tloka avatar wvdtoorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

biocpp-core's Issues

Core setup in documentation missing some requirements.

Hello! I'm using biocpp core/io for a new project and realized some setup steps seem to be missing/unclear.

  1. If I only need the IO module (biocpp-io), I still need to have biocpp-core as well, right?
  2. Do both of them need to be added as submodules separately? It gives a weird directory structure as a result (project/submodule/biocpp-io/include/biocpp/io/ and project/submodule/biocpp-core/include/biocpp/alphabet etc/). If biocpp-core is a requirement of biocpp-io, why not just have them in the same project?
  3. I realized while following the core-setup, I need the fmt library. I added it as another submodule and then added it into my CMakeLists.txt file, but this wasn't explicitly mentioned anywhere. Is it a necessary submodule?

Thanks for your help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.