Giter Club home page Giter Club logo

bwt's Introduction

BWT算法可以将一个短序列a与长序列A进行匹配,找出a在A中的位置。算法基本操作为:

  1. 针对母序列构建BWT序列,在母序列末尾添加一个$符循环右移,每次移动一位。得到n(n为母序列长度)个长度为n的序列。
  2. n个序列按字典序排序,形成BWT阵列。
  3. 取每个序列的最后一位,从上到下拼在一起,即为BWT串。
  4. 取待查找子串的最后一位字符x,在BWT阵列左侧第1列查找该字符x,获取该行最后一位字符k,若该行末尾k为BWT最后一列中的第n个k,则在BWT阵列左侧第一列寻找第n个k,取该行末尾为新的k,循环,若循环过程中每一个k形成的序列与待查子串的逆序不匹配则退出循环,若一直匹配,则m次操作后停止(m为待查子串长度),停止时k所在的行数即为待查子串在母串中的位置。

bwt's People

Contributors

hitlxc avatar

Watchers

 avatar  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.