在Biopython中是否有使用PhyML和智能模型选择的方法?

在Biopython中是否有使用PhyML和智能模型选择的方法?,python,biopython,Python,Biopython,现在,我正在寻找在Biopython中使用PhyML和智能模型选择的方法 根据PhyML的官方文献(SMS:Smart Model Selection in PhyML:),有模型选择的命令行界面(但我在任何地方都找不到)。Biopython有一个来自Bio.Phylo的名为的模块。应用程序导入PhymlCommandline,并可以从python脚本执行PyhML 有没有办法在Python中集成PhymlCommandline和智能模型选择?您可以从ATGC蒙彼利埃生物信息学平台网站的下载SM

现在,我正在寻找在Biopython中使用PhyML和智能模型选择的方法

根据PhyML的官方文献(SMS:Smart Model Selection in PhyML:),有模型选择的命令行界面(但我在任何地方都找不到)。Biopython有一个来自Bio.Phylo的名为
的模块。应用程序导入PhymlCommandline
,并可以从python脚本执行PyhML


有没有办法在Python中集成PhymlCommandline和智能模型选择?

您可以从ATGC蒙彼利埃生物信息学平台网站的下载SMS的源代码

该代码是几个shell脚本的组合,并在后台使用R和PhyML

因此,下载zip文件,将其解压,并确保已安装R

$ unzip sms-1.8.1.zip
[...]
$ cd sms-1.8.1
sms-1.8.1 $ R --version
R version 3.5.1 (2018-07-02) -- "Feather Spray"
代码依赖于PhyML来计算似然分数。PhyML源嵌入在SMS tarball中。需要编译的包:

  • 对于Debian:“构建必要的”

    sudo-apt-get-install-build-essential

  • 对于SuSE:“发展基础”

    sudo zypper安装——键入模式开发基础

  • 对于Red Hat:“C开发工具和库”

    sudo yum-y-v groupinstall“C开发工具和库”

请注意,目录名中的空格可能会导致问题。现在我们需要构建PhyML源代码

sms-1.8.1 $ make all
[...]
然后使shell脚本可执行

sms-1.8.1 $ chmod +x ./sms.sh
现在可以使用以下命令结构运行SMS

 ./sms.sh -i [input-msa] -d [data-type]
其中:

  • [input msa]
    是PHYLIP格式的输入数据对齐方式吗
  • [数据类型]
    对于氨基酸数据可以是
    aa
    ,对于DNA可以是
    nt
可选参数包括:

 -o : Path to the SMS output directory
 -c : Criterion to use 'aic' or 'bic'
 -u : Input tree in Newick format
 -t : Add this option to infer a PhyML tree with selected model
 -s : Type of tree improvement 'NNI' or 'SPR'
 -r : Number of random starting trees
 -b - Branch support (aLRT or bootstrap replicates)
 -h : Prints help
例如,使用以下文件中的示例文件:


谢谢你的回复。我下载了脚本并通过cygwin执行脚本(因为我的计算机是windows10)。但是我在处理过程中遇到了错误(cp:cannotstat“”…/sms-1.8.1/sms/sms.phy_phyml_tree_GTR+G+I+F-lr.txt“”:没有这样的文件或目录)。您知道解决方案吗?您可能从错误的目录执行命令?您能否手动确认
sms
子目录中有一个名为
sms.phy\u phyml\u tree\u GTR+G+I+F-lr.txt的文件?
sms-1.8.1 $ ./sms.sh -i primatesNT.phy -d nt -c bic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     Starting SMS v1.8.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Input alignment    : primatesNT.phy
Data type          : DNA
Number of taxa     : 21
Number of sites    : 1500
Number of branches : 39
Criterion          : BIC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 1 : Set a fixed topology
        BIC=13172.69687
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 2 : Select the best decoration
        BIC=13165.48751 decoration : '+G'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 3 : Select the best matrix
        BIC=13155.36733 matrix : 'HKY85'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 4 : Select the best final decoration
        BIC=13155.36733 decoration : '+G'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Selected model                          : HKY85 +G
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Substitution model                      : HKY85
Equilibrium frequencies                 : ML optimized
Transition / transversion ratio         : estimated
Proportion of invariable sites          : fixed (0.0)
Number of substitution rate categories  : 4
Gamma shape parameter                   : estimated (0.587)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Suggested citations:
SMS
 Vincent Lefort, Jean-Emmanuel Longueville, Olivier Gascuel.
 "SMS: Smart Model Selection in PhyML."
 Molecular Biology and Evolution, msx149, 2017.
PhyML
 S. Guindon, JF. Dufayard, V. Lefort, M. Anisimova, W. Hordijk, O. Gascuel
 "New algorithms and methods to estimate maximum-likelihood phylogenies: assessing the performance of PhyML 3.0."
 Systematic Biology. 2010. 59(3):307-321.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~