用于简化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文件分块,获取长度字节   java嵌入式Tomcat不执行jsf页面   java我的数据库中有2个实体,但hibernate返回其中6个。   java如何基于逗号拆分字符串   java取消已经运行的CompletableFutures的预期模式是什么   java如何在informix中从另一个数据库复制表ddl和数据   为什么图片是黑色的?   java根据字符串数组中的单词筛选列表   Java8的集合。平行流有效吗?   Kotlin中的java静态内部类   java如何在GUI中生成一列字符串   javafx如何正确使用高对比度主题?   带空格的javascript Httpurlconnection参数   java如何设置GridBagLayout的约束   java如何在一个线程可能尚未初始化时关闭另一个线程   java将简单时间格式转换为特殊时间格式(hhmmt)   安卓/java阵列重复过滤器的问题   java在队列的链接实现下,入队和出队是如何工作的   java更新sql外键约束