用于简化MAPP预测分析工作流的包。

Mapp的Python项目详细描述


此包用于简化 MAPP program

先决条件

您必须安装:

  • python 2.7版
  • MAPP program
  • 可选择下载fasta database (或者可以远程使用hmmer或blast程序)。
  • 安装序列搜索程序。推荐使用HMMER。 或者可以下载BLAST
  • 安装多序列比对程序(推荐使用MAFFT)。
  • 安装系统发育树构建程序(推荐使用FastTree)。
  • 安装Biopython包(如果要使用文件转换工具)。

设置文件

对于mapp分析,需要设置文件(语法为python ConfigParser)。

设置文件包含命令和命令的输入/输出。 一个命令应该是一个基本的shell命令(不允许使用分号等)。

设置文件可以很容易地由另一个脚本创建,然后很容易运行 同时进行多重MAPP分析。

settings.conf所需的基本和最小结构是:

[commands]
#id used for name of analysis
id=
#sequence file in fasta format
sequence =
#output file from blast or hmmer program
blastout =
#file where programs store stats about sequence picking
blaststat =
# blast command to run
blast =
# input file for multiple sequence aligning program (same as blast output)
msain = %(blastout)s
# msa program output file
msaout =
# this command is executed before msa program is executed
# (it could be for blast output conversion and purifying)
beforemsa =
# msa program command
msa =
# tree program input file (converted msaout file to newick format)
treein =
# tree program output file
treeout =
# this command is executed before the tree program
beforetree =
# tree program command
tree =
# mapp program input msa file (in fasta format - could be the same as msaout value)
mappinmsa =
# mapp program input tree file (in newick format)
mappintree =
# mapp program output file
mappout =
# command before the mapp command (good for e.g. adjust tree to proper newick format)
# MAPP is really sensitive to proper file format
beforemapp =
# MAPP command itself
mapp = java -jar MAPP.jar -f %(mappinmsa)s -t %(mappintree)s -o %(mappout)s

python程序中的基本用法

基本python代码:

from mapp.core.analyzers import Analyzer
from mapp.core.parsers import SettingsParser
from mapp.core.exceptions import MappError

settings_file = 'settings.conf'

def main():
    try:
        mapp = Analyzer(SettingsParser(settings_file))
        mapp.exec_mapp()
    except MappError as e:
        print(e.header)
        print(e.description)

if __name__ == '__main__':
    main()

帮助程序文件

mapp.utils包中,有一些文件可以用作独立脚本或模块。这个文件主要用于文件转换和净化。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java是否在servlet中检索上一页路径?   Java抱怨在开关的默认情况下未初始化最终字段   Java泛型:为什么编译器不能判断这个类<t>对象与这个类的类型参数的对象的类具有相同的类型?   Java:继承方法中使用的私有变量   HibernateJava。ClassCastException:java。lang.Integer不能强制转换为abc。def。我的项目。奥姆。EmployeeTopMetaData   http java发布和下载文件   java改进条件检查   java如何将2d数组的条目作为键放在地图中   java如何获取传递给运行时的值。getRuntime。JUnit测试用例中的exit(value)   java注释来创建所有可能的构造函数   自动建议列表:java。lang.IllegalArgumentException:在XPath表达式为null时找不到元素   为什么MapAPI在Java中不提供流功能?   gradle不导入本地java库   尽管我使用的是SessionCreationPolicy,java Spring安全性似乎仍在使用会话。无国籍   使用java查找MongoDB中数组元素的平均值