debruijn | de Bruijn graph construction tool | Genomics library

 by   rchikhi C++ Version: Current License: No License

kandi X-RAY | debruijn Summary

kandi X-RAY | debruijn Summary

debruijn is a C++ library typically used in Artificial Intelligence, Genomics applications. debruijn has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

This software is quite old (2011). There are better techniques nowadays. A better de Bruijn graph construction algorithm is BCALM: (readable Python code here: Another is an implementation included in the book Genome-Scale Algorithm Design (Chapter 13.2, Software that constructs the de Bruijn graph of a set of reads (FASTA or FASTQ file). Edges are the (k+1)-mers that appear in the reads, nodes are the k-mers. No distintion is made between a k-mer (resp. (k+1)-mer) and its reverse-complement. It returns a graph in the KisSplice format (ad-hoc) or DOT format (can be opened by most applications, including Zgrviewer and Gephi). The de Bruijn graph is useful for many next-generation sequencing applications, including de novo genome assembly and variant detection. For k 32, this implementation uses.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              debruijn has a low active ecosystem.
              It has 15 star(s) with 3 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of debruijn is current.

            kandi-Quality Quality

              debruijn has 0 bugs and 0 code smells.

            kandi-Security Security

              debruijn has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              debruijn code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              debruijn does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              debruijn releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of debruijn
            Get all kandi verified functions for this library.

            debruijn Key Features

            No Key Features are available at this moment for debruijn.

            debruijn Examples and Code Snippets

            No Code Snippets are available at this moment for debruijn.

            Community Discussions

            QUESTION

            How does one find the floor of the log-base-2 of an n-bit integer using bitwise operators?
            Asked 2021-Aug-06 at 12:51

            I have a program in which it is necessary to calculate the floor of the log-base-2 of an integer very frequently. As a reuslt, the performance of the standard library's log2 method in my language of choice (floor(std::log2([INT])) from in C++) is unsatisfactory, and I would like to implement the quickest version of this algorithm possible. I have found versions online which use bitwise operators to calculate this value for 32-bit and 64-bit integers:

            ...

            ANSWER

            Answered 2021-Aug-06 at 12:51

            I agree with harold that std::countl_zero() is the way to go. Memory has gotten a lot slower relative to compute since this bit-twiddling hack was designed, and processors typically have built-in instructions.

            To answer your question, however, this hack combines a couple primitives. (When I talk about bit indexes, I'm counting from most to least significant, starting the count at zero.)

            1. The sequence of lines starting with v |= v >> 1; achieves its stated goal of rounding up to the nearest power of two minus one (i.e., a number whose binary representation matches 0*1*) by setting every bit to the right of at least one set bit.

              • None of these lines clears bits in v.
              • Since there are right shifts only, every bit set by these lines is to the right of at least one set bit.
              • Given a set bit at position i, we observe that a bit at position i + delta will be guaranteed set by the lines matching delta's binary representation, e.g., delta = 13 (1101 in binary) is handled by v |= v >> 1; v |= v >> 4; v |= v >> 8;.
            2. Extracting bits [L, L+delta) from an unsigned integer n with WIDTH bits can be accomplished with (n << L) >> (WIDTH - delta). The left shift truncates the upper bits that should be discarded, and the right shift, which is logical in C++ for unsigned, truncates the lower bits and fills the truncated upper bits with zeros.

            3. Given that the answer is k, we want to extract 5 (= log2(32), for 32-bit) or 6 (= log2(64), for 64-bit) bits starting with index k from the magic constant n. We can't shift by k because we only know pow2(k) (sort of, I'll get to that in a second), but we can use the equivalence between multiplying by pow2(k) and left shifting by k as a workaround.

            4. Actually we only know pow2(k+1) - 1. We're going to be greedy and shave the two ops that we'd need to get pow2(k). By putting 5 or 6 ones after the initial zeros, we force that minus one to always cause the answer to be one less than it should have been (mod 32 or 64).

            5. So the de Bruijn sequence: the idea is that we can uniquely identify our index in the sequence by reading the next 5 or 6 bits. We aren't so lucky as to be able to have these bits be equal to the index, which is where the look-up table comes in.

            As an example, I'll adapt this algorithm to 8-bit words. We start with

            Source https://stackoverflow.com/questions/68677658

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install debruijn

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rchikhi/debruijn.git

          • CLI

            gh repo clone rchikhi/debruijn

          • sshUrl

            git@github.com:rchikhi/debruijn.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link