GithubHelp home page GithubHelp logo

lfdbg's Introduction

LFdBG (Lock-Free-de-Bruijn-Graph)

LFdBG is fast and easy to work with C++ library that uses Lock-Free structures for de-Novo genome assembly.

Table of contents

Installation

For the library to work properly it needs Boost library to be installed on the computer. On linux it can be installed with this command.

sudo apt-get install libboost-all-dev

This library needs version 11 of C++, because of std::atomic.

Other than that using LFdBG library does not need anything else installed.

Usage

When creating the LFdBG object, the user must provide a few fundamental parameters: the graph dimension (lenght of k-mers), the number of threads to be used for assembly, the size of the hash table, average read length and approximate genome size. There is also type bool parameter called normalize. If we do not want to try to normalize our graph we can simply set it to false.

The LFdBG class provides two public methods:

  • Using the getContigs method we can get a copy of the created contigs. When used for the first time, the algorithm will search the graph and remember the paths found. On following calls, the previously saved contigs will be returned.

  • The getGraph method returns the graph as a set of all created nodes with their mers as a series of strings. If we also want to obtain weights, we must pass the boolean value true as a parameter of the method.

Example of usage with parameters:

  • k=6
  • average read length = 200
  • approximate genome size = 1000000
  • number of threads = 4
  • table size = 4000000
  • normalization = true (default value)

Code:

#include "LFdBG.h"
LFdBG d = LFdBG(6, reads, 200, 1000000, 4, 4000000);
auto contigs = d.getContigs();

When we do not know size of a genome we can switch off normalization step of the algorithm by adding false as a last parameter.

Other examples can be found in unitTests.cpp file under the tests folder.

Licence

This library with source codes is available under MIT license.

Copyright (c) 2022 Daniel Gorniak, Robert Nowak, Warsaw University of Technology

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

lfdbg's People

Contributors

dandon223 avatar

Stargazers

 avatar

Watchers

 avatar

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.