暗能星系

    • 登录
    • 搜索

    blast c++ toolkit 源码分析和使用

    生物信息分析
    1
    3
    29
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • A
      anneng 最后由 anneng 编辑

      https://ncbi.github.io/cxx-toolkit/pages/ch_intro#ch_intro.intro_time
      C++toolkit
      https://www.ncbi.nlm.nih.gov/toolkit
      The NCBI C++ Toolkit is a public-domain collection of portable libraries, consisting of a cross-platform application framework and a set of utilities and supporting classes to work with biological data.
      C++ 工具箱是一个可移植的基础库,包括跨平台的应用框架和一系列工具,用于处理生物数据。blast+就是基于这个库开发的。

      包括的模块及其内部结构:
      1.Corelib 模块
      核心基础模块,包括如下子模块:

      • Application Framework
        eae3055c-b358-4f8e-967d-17a338f4cfd6-image.png
        该模块最重要的类是抽象类CNcbiApplication 该类定义了所有应用的生命周期类方法Init(), Run(), and Exit(). 以及AppMain()入口函数。

      • Argument processing 参数处理
        辅助进行参数校验

      • Diagnostics 诊断
        提供日志管理功能,日志可以设置 Information, Warning, Error, Critical, Fatal, or Trace.六种级别。

      • Environment Interface环境变量
        设置和访问环境变量

      • Files and Directories 文件和目录
        封装文件和目录访问类功能

      • MT Test wrappers 对多线程的封装
        CThreadedApp 集成自 CNcbiApplication 提供了线程相关的接口。

      • Object and Ref classes 对象和引用类

      • Portability definitions 可移植的通用定义
        Int1, Uint1, Int2, Uint2, Int4, Uint4, Int8, Uint8

      • Portable Exception Handling 可移植的异常处理

      • Portable Process Pipes 可移植的进程管道

      • Registry 配置参数管理

      • STL Use Hints 提供各种可移植的宏定义
        如命名空间
        BEGIN_NAME_SPACE END_NAME_SPACE

      • String Manipulations 字符串操作

      • Template Utilities 模板工具 像一些数据结构工具
        list, vector, set, multiset, map or multimap

      • Threads 线程

      • Time 日期和时间

      1. ALGORITHM 算法模块
        主要分三类:
        ALIGN:对齐比对算法。A set of global alignment algorithms, including generic Needleman-Wunsch, a linear-space Hirschberg’s algorithm and a spliced (cDna/mRna-to-Genomic) alignment algorithm.
        BLAST:Basic局部比对查询算法.(我们重点要用的算法)
        SEQUENCE.:不同的关于序列操作的算法 antigenic determinant prediction, CPG-island finder, ORF finder, string matcher and others.
        3.CGI(Common Gateway Interface)模块
        为编写CGI程序提供支持。主要用来支持HTTP报文的请求和响应。
        4.CONNECT 模块
        处理网络连接
        socket 连接器connector sendmail 线程池
        5.ctool模块
        为c++ toolkit 和 之前旧的 ctool 模块提供转换和桥接。
        6.DBAPI 模块(可以看看这个模块是否可以方便的连接HBase)
        为访问 RDBMS 提供封装。
        7..GUI 模块
        本身不提供GUI模块 可以集成第三方图形库,推荐 wxWidgets
        8.HTML模块
        动态生成HTML页面
        9.OBJECT MANAGER 对象管理器
        为访问序列(如GenBank中的序列)提供工具
        10.SERIAL 模块
        ASN.1 (text or BER encoding), XML, and JSON 格式处理。
        11.UTIL 模块
        Lightweight Strings
        Range Support
        Linked Sets
        Random Number Generator
        Registry based DNS
        Regular Expressions
        Resizing Iterator
        Rotating Log Streams
        Stream Support
        String Search
        Synchronized and blocking queue
        Thread Pools
        UTF 8 Conversion
      1 条回复 最后回复 回复 引用 0
      • A
        anneng 最后由 anneng 编辑

        如何编译 c++ toolkit?
        https://ncbi.github.io/cxx-toolkit/pages/release_notes#release_notes.MS_Windows
        安装编译环境
        15ebd6ea-0770-40bf-8cb8-b38c52f8968a-image.png
        安装过程中一定要选择windows通用CRT SDK
        570116c9-fa0d-4b78-8aaa-37d3267845fb-image.png
        选择编译范围:
        toolkit预置了5个工程,下面前两个为命令行程序 后三个为图形界面程序。也可以通过svn导入需要的源码来构建需要的项目。
        compilers\vs2017\static\build\ncbi_cpp.sln(我们后面使用这个工程)
        compilers\vs2017\dll\build\ncbi_cpp.sln
        compilers\vs2017\static\build\gui\ncbi_gui.sln
        compilers\vs2017\dll\build\gui\ncbi_gui.sln
        compilers\vs2017\dll\build\gbench\ncbi_gbench.sln

        打开 ncib_cpp.sln 右键选择_CONFIGURE_ 执行build
        CONFIGURE 是一个特殊的project,利用 src....\Makefile.来生成VS项目
        Configuring is the process of creating configuration files that define exactly what can be built and what options may be used in the build process. The created configuration files include C headers that define suitable preprocessor macros, as well makefiles (for Unix) or project solutions (for MS Visual C++ or for Xcode) used in the build step.
        de69bc22-3235-4064-a699-850a0548b185-image.png
        配置过程中 会弹出来下面的对话框 选择
        忽略*
        04410dd8-e61a-4639-aa94-3e945cb5aed4-image.png

        配置涉及的文件主要有:
        src\build-system\Makefile.mk.in.msvc
        src\build-system\project_tree_builder.ini
        src\….\Makefile.*.msvc
        scripts\projects*.lst

        1 条回复 最后回复 回复 引用 0
        • A
          anneng 最后由 编辑

          toolkit第一次编译的时候就要选择debug或者release 一旦编译一个 切换另一个就会失败 我们先使用debug进行调试

          1 条回复 最后回复 回复 引用 0
          • First post
            Last post
          Powered by 暗能星系