- Open Access
LMAP: Lightweight Multigene Analyses in PAML
BMC Bioinformatics volume 17, Article number: 354 (2016)
Uncovering how phenotypic diversity arises and is maintained in nature has long been a major interest of evolutionary biologists. Recent advances in genome sequencing technologies have remarkably increased the efficiency to pinpoint genes involved in the adaptive evolution of phenotypes. Reliability of such findings is most often examined with statistical and computational methods using Maximum Likelihood codon-based models (i.e., site, branch, branch-site and clade models), such as those available in codeml from the Phylogenetic Analysis by Maximum Likelihood (PAML) package. While these models represent a well-defined workflow for documenting adaptive evolution, in practice they can be challenging for researchers having a vast amount of data, as multiple types of relevant codon-based datasets are generated, making the overall process hard and tedious to handle, error-prone and time-consuming.
We introduce LMAP (Lightweight Multigene Analyses in PAML), a user-friendly command-line and interactive package, designed to handle the codeml workflow, namely: directory organization, execution, results gathering and organization for Likelihood Ratio Test estimations with minimal manual user intervention. LMAP was developed for the workstation multi-core environment and provides a unique advantage for processing one, or more, if not all codeml codon-based models for multiple datasets at a time. Our software, proved efficiency throughout the codeml workflow, including, but not limited, to simultaneously handling more than 20 datasets.
We have developed a simple and versatile LMAP package, with outstanding performance, enabling researchers to analyze multiple different codon-based datasets in a high-throughput fashion. At minimum, two file types are required within a single input directory: one for the multiple sequence alignment and another for the phylogenetic tree. To our knowledge, no other software combines all codeml codon substitution models of adaptive evolution. LMAP has been developed as an open-source package, allowing its integration into more complex open-source bioinformatics pipelines. LMAP package is released under GPLv3 license and is freely available at http://lmapaml.sourceforge.net/.
Selection of beneficial mutations may cause the fixation of alleles conferring fitness advantage to the organisms of a population, which ultimately may result in the adaptive evolutionary diversification of life forms. Uncovering at the molecular level how this biological process of phenotypic diversity arises and is maintained in nature has long been of interest to the evolutionary biologist. In this regard, the advent of new genome sequencing technologies has remarkably increased the efficiency of contemporary molecular research [1–3]. In particular, significant progress has been made towards the discovery of protein-coding genes that may underlie adaptive evolution of phenotypes. This has prompted an enormous collection of new genome sequence data requiring fast and efficient specialized bioinformatics software for assisting researchers in downstream analyses [2, 3].
Currently most available tests of adaptive evolution are based on Maximum Likelihood (ML) codon-based models that assess the nonsynonymous (d N) to synonymous (d S ) substitution rate ratio (ω = d N/d S), where ω can be greater, equal or less than 1, indicating positive, neutral or negative selection, respectively . Although a large number of applications integrating this framework and accounting for codon-based likelihood models of evolution are readily available, the codeml program from the Phylogenetic Analysis by Maximum Likelihood (PAML) package  is the most widely used in the literature, statistically robust and accurate in examining selective pressure [6–11]. Henceforth, codeml will only refer to codon substitution models.
The evaluation of selection signatures is processed in two stages. First, codeml executes different model approaches, each of which uses different assumptions about how ω varies across a multiple sequence alignment (MSA) and/or phylogeny: (i) site-specific models (SM) [12, 13], (ii) branch-specific models (BM) [14, 15], (iii) branch-site specific models (BSM) [13, 16, 17] and (iv) clade-specific models (CM) [8, 18]. Second, for all models, a Likelihood Ratio Test (LRT) [12, 19, 20] is used to examine the goodness-of-fit between two nested models and determine which fits the dataset better (for details please see Supplementary Data in ).
We present a brief summary of the models here addressed and the reader is encouraged to see the involved references for further information.
The SM are generally applied to detect the presence of positively selected sites in the MSA. It employs different site class specific models: (i) the alternative classes which includes model 3 (M3), 2 (M2a) and 8 (M8) and, (ii) the null classes which includes model 0 (M0), 1 (M1), 7 (M7) and 8a (M8a). Models are pairwise compared (M0 vs. M3, M1a vs. M2a, M7 vs. M8, M8a vs. M8 [12, 21, 22]) using LRT. Whenever LRTs are significant, sites under selection are identified by the Bayes Empirical Bayes (BEB) analysis , except for the M0 vs. M3 comparison, since it does not allow detection of positive selection  and M3 does not provide the BEB estimation.
The branch related models (BRM—BM, BSM and CM) require an a priori partition of the phylogeny by implementing a branch labeling scheme allowing one to examine one or more lineages or even entire clades (e.g., [23–30]), usually defined as “foreground” and “background” branches or lineages . Additional information on technical aspects can be found in PAML documentation.
The BM determines signals of divergence among lineages by examining whether changes in ω ratios vary significantly or not between branches [14–16]. Although various model comparisons are possible, this generally involves performing two LRT comparisons among three models [14, 28]. The first is accomplished by testing the null M0 against an alternative with a two-ratio unconstrained (TrU) model (M0 vs. TrU). If TrU fits the data better, then the second LRT comparison can be tested in order to validate signals of divergence. Here, TrU is tested against a two-ratio constrained (TrC, where ω = 1) model (TrC vs. TrU). Because the BEB analysis is not quantified in BM, positively selected sites cannot be inferred.
The BSM arose from the extension of the SM and BM and allows the detection of episodic selection occurring along few lineages [7, 16]. Here ω is allowed to vary both among sites and lineages, enabling inter-specific comparisons and detection of selection in a subset of sites within a subset of branches of the phylogenetic tree [16, 31]. In the phylogeny only two partitions are possible , (i) one configuring a model that allows positive selection on the foreground branches, the alternative model A (MA), and (ii) the other, a model that allows neutral and negative selection both on the foreground and background lineages, the null model A1 (MA1, where ω = 1) [13, 17]. In case of a significant LRT in this test (MA1 vs. MA), sites under positive selection can be inferred with high posterior probabilities through the BEB analysis.
Similarly, to the BSM, the CM can test for variation in selection pressures acting among sites and lineages, allowing the detection of divergent selection among clades, whether in the foreground or background branches. Under CM, a phylogeny can incorporate more than two partitions [8, 18]. Here the alternate model C (CmC)  estimates several separate ω ratios for two or more clades and is compared to a null model 2a_rel (M2a_rel), by applying a constraint enforcing ω to be fixed among clades . The significance of site-specific divergence among clades is established via a LRT comparison between the two models (M2a_rel vs. CmC) [8, 32]. If the CmC is significant, then the BEB analysis can be used to identify sites experiencing divergence among clades. To further decide if divergently selected sites among clades are significantly under the action of positive selection, the value ω of the divergent site class is constrained to be equal to 1 and compared against an unconstrained CmC [11, 32].
SM, BM, BSM and CM LRT comparisons are respectively summarized in Additional file 1: Tables S1–S4 (bottom).
The codeml models constitute a well-defined workflow for analyzing genome-wide data and documenting selection in protein-coding genes. However, it can be highly challenging in practice due to the huge amount of information, as data integration and analysis involves often multiple tasks that need to be manually performed by the researcher, including gathering and organizing input data , manipulating software configuration files, and running and analyzing the results. Specifically in the codeml workflow, it is necessary to generate (i) MSAs, (ii) phylogenetic trees, (iii) edit the parameter files, (iv) organize files in folders, (v) run codeml, (vi) collect all necessary ML parameter estimates and (vii) estimate all LRT comparisons in spreadsheet documents. Moreover, the challenge is even greater when performing these tasks repetitively for multiple datasets (i.e., MSAs and phylogenetic trees), making the whole process very tedious, error-prone and time-consuming.
To overcome such difficulties several bioinformatics resources have been developed. They can be organized in two paradigms: single-task (one instance, one execution: JCoDA , Armadillo , PAMLX , IMPACT_S ) and multi-task (one instance, several executions: IDEA , gcodeml , POTION , VESPA ). In the single-task software group, SM executions are possible in all software, while BM and BSM are also possible in Armadillo and PAMLX. This last one additionally allows CM executions. Regarding the multi-task software group, SM executions are possible in IDEA, POTION and VESPA, while BSM are possible in both gcodeml and VESPA. IDEA further allows BM executions. In this group, IDEA, gcodeml and VESPA provide parallelized and/or distributed executions by including cluster or GRID functionality. Despite providing an important advancement in large scale analyses, they are however, too complex to install and configure , and usually require unavailable infra-structures or informatics skills. For instance, the gcodeml is mainly intended for production managers . Such difficulties are minimized by the recent POTION software aimed at the more ubiquitous multi-core environment. Here a single workstation may currently offer 30 or more cores by combining two or more CPUs, thus providing a reasonable amount of processing capacity.
In addition to the desktop-based applications described, there are also web-server implementations available, namely PSP , PhyleasProg  and Selecton version 2.2 . All involve SM, but PSP and PhyleasProg also include BSM analyses.
To our knowledge, from the available literature and from the mentioned multi-task software group, detection of positive selection is performed mainly using SM, while none of them considers the CM approach (see also Additional file 9 in ). Despite all these attempts, there is still the need of a software which simplifies the manual manipulation required for evolutionary analyses, while still including all the codeml models.
Here we propose LMAP (Lightweight Multigene Analyses in PAML), a high-throughput user-friendly software package designed to simplify evolutionary analyses performed with any of the described codon substitution models (SM, BM, BSM and CM). LMAP package is composed of six command-line and interactive Perl  applications designed to handle step-by-step the codeml workflow, thus minimizing user intervention. Although there are six applications, one of them (lmap.pl) further combines all others hereby reducing the codeml workflow to a single execution.
To enable LMAP trial and testing, an example dataset consisting of the mitochondrial DNA of 20 freshwater and terrestrial turtles is provided in the archive.
In the following sections, we present LMAP development, devised codeml templates, how input is simplified and how scheduling copes with workstation CPU capacity. Finally, we present the functioning of each LMAP application, discuss potential future developments and introduce the example dataset with which are performed benchmarking tests.
LMAP package was implemented in Perl  and has been tested in Linux/UNIX and MacOS. It consists of six command-line and/or interactive applications, (i) gmap.pl, (ii) cmap.pl, (iii) mmap.pl, (iv) imap.pl, (v) omap.pl and (vi) lmap.pl. Additionally, four specific LMAP library modules (MyUtil.pm, MyNotify.pm, MyPAMLInfo.pm and MyPhylo.pm) support the execution of these applications.
LMAP requires the Comprehensive Perl Archive Network (CPAN)  modules in five cases: (i) in gmap.pl, for parsing and editing of Newick tree files (BioPerl  module); (ii) in mmap.pl, for email functionalities and interactive monitoring of codeml parallel executions (for which are required the UNIX sendmail  and screen  utility programs); (iii) in gmap.pl and omap.pl, for interactive modes; (iv) in omap.pl, for statistics functions involved in estimation of LRTs; and (v) in all applications, for handling files and directories.
Although BioPerl modules enable PAML results processing, its implementation is limited to users with programming skills. By contrast, our package implements all necessary functions, excluding the cases mentioned above hereby requiring minimal installation efforts. Such necessary functions include specific procedures in the imap.pl application to allow the retrieval of ML parameter estimates.
To alleviate the installation of CPAN modules and utility programs we have included the install.pl application (see also the Availability and requirements section).
LMAP management of codeml parameters and templates
Since all codon substitution models (SM, BM, BSM and CM) require different codeml control file configurations, we have defined nine templates (Additional file 1: Tables S1–S4). Two templates are used for SM (M0/1/2/3/7/8 and M8a) (Additional file 1: Table S1), three for BM (M0, TrC and TrU) (Additional file 1: Table S2), two for BSM (MA and MA1) (Additional file 1: Table S3), and two for CM (CmC and M2a_rel) (Additional file 1: Table S4). Some parameters on these templates are automatically adjusted by our software, such as input dataset (seqfile and treefile), translation table code (icode), NSsites, kappa (k) and omega (ω) values. Before getting started, the user is encouraged to verify the remaining parameters for each template and make any necessary adjustments, which will remain applicable until new modifications are enforced. In order to detect and avoid local optima , several values of k and ω parameters are by default defined in gmap.pl (Additional file 1: Tables S1–S4). To this end, any selection of values, can be used to perform independent executions for the same dataset.
LMAP choice of selection models and input files
Here we describe how LMAP simplifies input by asking the researcher to specify the selection models in the dataset, ensuring the correct associations of MSA and tree files in the templates.
This is accomplished when naming the MSA file(s) and the phylogenetic tree file(s). In the case of MSA file(s), three key elements are necessary: (i) any identity or abbreviation of the protein-coding gene(s), (ii) model(s) identity(ies) to be applied, which could be run one or more at a time (‘s’, ‘b’, ‘w’, ‘c’ letters representing SM, BM, BSM and CM, respectively) and (iii) the appropriate icode parameter value. Thus, the MSA identity is represented as [GeneName]_[sbwc][icode].fasta (without brackets). In the case of the phylogenetic tree(s), the nomenclature depends on the existence of labeling. Tree labeling is necessary when examining BRM, but not with SM. Therefore, these two procedures require different identities. In the SM case, the user needs to type the same gene name as its correspondent MSA file and the SM letter ‘s’, resulting in the format [GeneName]_s.nwk (without brackets). In the BRM case, tree labeling depends on the branch partitions scheme (hypothesis) defined by the researcher. Hence, the tree file should be named after the hypothesis reference (HR) and include one or a combination of BRM (letters ‘w’, ‘b’, ‘c’), which is represented as [HR]_[wbc].nwk (without brackets). It is worth noting that in the SM case, the MSA will only be combined with a similarly named phylogenetic tree, that is, [GeneName]_[sbwc][icode].fasta with [GeneName]_s.nwk (without brackets) (e.g.: MSA ATP6_sbwc1.fas with tree ATP6_s.nwk).
An advantage of this design is that it allows the user to combine in a single step one or more, if not all unique MSAs, with as many as required phylogenetic tree files (or hypotheses) to be run, regardless of the models specified (letters ‘s’, ‘w’, ‘b’, ‘c’) (e.g.: ATP6_sbwc1.fas with TWC_w.nwk and with 2WA_b.nwk). To conclude, in order to combine an MSA and a tree, the same model letter must be specified in both input files names. Please see the manual included in LMAP package for more information.
LMAP scheduling of Codeml executions
In this section, we describe how the mmap.pl application was designed to cope with several codeml executions and its relation with the workstation CPU capacity.
At this stage, the input files together with codeml control files are ready for execution in subfolders within a base folder, which we refer to henceforth as directory structure.
The mmap.pl allows the user to run as many codeml tasks as desired. Because the total number of tasks can be very large, most probably surpassing the total number of CPU cores, the application provides the command-line option (CLO) -n to define the maximum tasks to be run. This will define the maximum number of cores utilized (one task per core). When used, a value for this option must be defined, or otherwise the value is automatically estimated. In this case, the application quantifies an approximate number of available CPU cores, which in consequence defines the maximum number of codeml tasks to be run. This is achieved by calculating the difference of total number of cores to the overall CPU load. Under these circumstances, the quantification of available CPUs by the application makes sense, since it maximizes the performance of the whole scheduling.
It is noteworthy, that the greater the number of CPU cores available, the faster the execution of the mmap.pl application will be. Nevertheless, this is highly dependent on the user’s workstation configuration (CPU, memory, etc.). Please see the Example dataset and benchmarking section for more information.
Results and discussion
LMAP applications and functionalities
The LMAP software package consists of six applications. The first five are independently applied to accomplish one-by-one the system workflow, which should be accomplished in the following order: gmap.pl, cmap.pl, mmap.pl, imap.pl, omap.pl. The sixth and last application, lmap.pl, automatically combines all others and facilitates the workflow in one step (Fig. 1). We describe next the functionality of each application in an orderly fashion and according to several related command-line options.
The gmap.pl provides two functions: (i) generation of the directory structure and (ii) editing and/or labeling of phylogenetic trees. In the first, codeml input files are organized based on input datasets, CLOs and user definitions (Additional file 2: Figure S1). The option -m, enables the selection of which codeml models to run (letters ‘s’, ‘w’, ‘b’, ‘c’), hereby selecting the input files which have the same indication (see Implementation–LMAP choice of selection models and input files). Moreover, the options -K and -O aid in specifying k and/or ω values for the same dataset to avoid local optima , resulting in multiple executions starting from different initial parameter values. The second gmap.pl function is accessed by specifying the CLO -t, instead of -T and enables an interactive mode (Fig. 2) during which a cladogram character-based layout is displayed with numbers identifying tree nodes. Based on the researcher’s a priori hypotheses, specific branches (PAML label #N) or clades (PAML label $N) of interest may be labeled into foreground or background (Additional file 2: Figure S2), where N is the branch partition number (see PAML documentation for tree labeling and references therein).
The cmap.pl (Additional file 2: Figure S3) is designed to allow users to make additional changes to any parameters of the codeml control files available in the directory structure. These modifications do not affect the LMAP templates and any adjustment to the parameters can take place at any time, before the codeml executions.
The mmap.pl (Fig. 3 and Additional file 2: Figure S4) application aims to run the codeml program on the directory structure. During this phase, the user is able to monitor the codeml instances that are currently in execution (in screen 1) (Fig. 3a), those which will be executed (Fig. 3b) and those that have finished (Fig. 3c) (both in screen 2). Through the monitoring, the user is able to quickly understand whether the codeml instances are running correctly (Fig. 3a – “[R: RUNNING]” tag), or otherwise are hanging or waiting for the user reply, which could mean invalid dataset specifications. Having found unwanted or problematic instances, these can be terminated by accessing the built-in process manager screen (Fig. 3d). Another useful functionality of mmap.pl, is that it provides a non-mandatory email notification, which occurs as soon as the batch of instances is completed.
After mmap.pl terminates, the resulting information from all the analyzed models can be extracted using imap.pl (see Additional file 2: Figure S5). This information is organized in a CSV file and will contain each model organized by rows, while its ML parameters estimates (omegas, log-likelihoods, kappas, proportions, posterior probabilities, among others) are organized by columns.
Following the imap.pl, the CSV file can be subsequently organized and summarized using the interactive application omap.pl (Fig. 4 and Additional file 2: Figure S6), to finally estimate the LRTs and their statistical significance (p-value) (Fig. 5). This application comprehends a total of 24 interactive commands (Additional file 2: Figure S7) and two data containers to let the user conveniently manipulate the input data (User Table – Fig. 4 and Final Table – Fig. 5). For the LRTs to be estimated all alternative and null models must be paired in consecutive rows, with the null placed above its alternative model counterpart. Once the statistical confidence value is defined and after issuing “plrt” (e.g.: “plrt 0.05”) (see Additional file 2: Figure S7), five new columns are automatically added to the Final Table, where the estimated results for each test are only displayed in the alternative model rows (Fig. 5).
The lmap.pl combines all above described applications in a single action, resembling a computational pipeline (Fig. 1). Proceeding in this manner, the users need only to specify minimal CLOs requirements (Additional file 2: Figure S8), such that no intervention is needed afterwards and until completion, when the researcher is finally required to estimate LRTs. During the lmap.pl execution, the CLO -m (Additional file 2: Figure S8) has the advantage to produce in one step all output CSV files from all the models results indicated, as opposed to imap.pl, which requires several separate executions. The simplicity of lmap.pl is also attained given that it excludes important CLOs (features) that are available in the individual applications, such as the CLO -x from the mmap.pl (Additional file 2: Figure S4) or the CLO -t from gmap.pl (Additional file 2: Figure S1).
LMAP is a straightforward and useful package to anyone seeking to perform high-throughput analyses of multiple genes or datasets. Through all its applications dismisses the need of manually creating folders and handling (input/output) datasets, editing control files, manual monitoring of codeml program executions and retrieval of various ML parameter estimates. Likewise, LMAP allows to automatically organize all results and perform LRTs in endless consecutive pairs of rows using a single interactive command. Additionally, four applications (cmap.pl, mmap.pl, imap.pl and omap.pl) are not tied to any special constraints of file identity or formats, rather they can be employed in any existing directory structures that have manually been created by the user. In this way, by adjusting the command-line options accordingly, it is possible to use cmap.pl to modify any codeml control files as well as to use mmap.pl and imap.pl to analyze the data and retrieve results, respectively. Furthermore, LMAP generates CSV tables bearing an appropriate format suitable for publication. To conclude, our software solves a variety of difficulties with just a few command-line options and together gives the possibility of receiving an email notification after completion.
Here important advantages standout over the POTION software. Beyond the incorporation of the BRM and phylogenetic tree labeling functionality, LMAP enables additional executions to avoid local optima and provides improved installation procedures (see Availability and requirements section). Additionally, LMAP makes the terminal more appealing to users, by providing a more structured and informative visualization further enhanced by the use of colors (Figs. 2, 3, 4 and 5).
Presently, LMAP has been developed to perform the analyses with the codon substitution models from the codeml program from the PAML package. Further features to make LMAP even more versatile will be incorporated in the near future. Nonetheless, LMAP is not applicable in Windows OS due to its main dependency on the screen utility program. This required compatibility feature, could be solved through the development of a Graphical User Interface (GUI). It would be interesting to develop LMAP further, by incorporating other kinds of codeml analyses, such as amino acid substitution models, and include other PAML programs, such as baseml or others. Regardless, the LMAP package will be continuously improved and updated towards the researcher’s needs, which has been accomplished by its application in several ongoing research studies in our group.
Example dataset and benchmarking
An example dataset is provided in LMAP archive to help users explore and experience the workflow of the package. This folder (“ExampleDataset”) contains two directories, one for MSAs and the other for phylogenetic trees, with files properly identified. A total of 20 whole mitochondrial genome sequences from turtle species (9 freshwater from the superfamily Tryonichia—Tryonichidae and Carettochelyidae—and 11 terrestrial from the family Testudinidae) were retrieved from the online NCBI database. From this survey, 12 mitochondrial DNA (mtDNA) protein-coding genes (ATP6, ATP8, COX1, COX2, COX3, CYTB, ND1, ND2, ND3, ND4, ND4L, ND5) were selected, which additionally compose the concatenated alignment, designated as TMConc2.
To execute LMAP, simply type the following in the command-line: “lmap.pl -A ./ExampleDataset/msas/ -T ./ExampleDataset/trees/ -d . -j ExampleDatasetResults -m s[0:1:2:3:7:8:8a],b,c,w -n 32 --no-omap”. Through CLOs -A and -T, the input files are retrieved to subsequently run the selected models (CLO -m). Likewise, the CLO -j identifies the main directory structure (“ExampleDatasetResults“), which will contain all results (see Additional file 3: Tables S1–S4) and is generated in the folder specified by CLO -d “.” (current directory). To fulfil the workstation CPU capacity, the maximum number of desired tasks was indicated through the CLO -n, which in our example was 32. For purposes of benchmarking, through the inclusion of the CLO --no-omap, the idle execution time from omap.pl was avoided forcing imap.pl to be executed last.
The output of this command-line originated 2690 codeml instances that took 11 h, 55 min and 43 s to complete. This was measured in the UNIX time  utility program, by using a single workstation configured with 64 GB of RAM and two Intel Xeon E5-2650v2 processors, which together yield a total of 32 hyper-threading cores. In contrast, using a single core, the same instances would take about 322 h, 20 min and 18 s (13 days). To summarize, our package does not interfere in the execution time required by PAML, but instead mitigates how much the researcher spends overseeing each step of the workflow, from the moment the input files are ready to be analyzed, which may be none or minimal.
We have developed a simple, versatile and highly customizable package named, Lightweight Multigene/Multi-core Analyses in PAML (LMAP) that readily enables the employment of different codeml models of molecular adaptive evolution (SM, BM, BSM and CM) and makes possible the analyses of a large number of datasets. At minimum, two files with the appropriate identity are required within a single input directory: one for the MSA and the other for the phylogenetic tree. From this instant, LMAP automatically creates, organizes, executes and extracts all information from the codeml results. Thereon, the user is required to manipulate and organize (sorting, selecting, moving, etc.) possibly hundreds or thousands of rows (models results) of his/her dataset in order to accomplish the LRT estimations. Despite this mediation, the process is much simpler than if performed with often slow spreadsheets. Additionally, LMAP allows users to carry out phylogenetic tree labeling; as well as to monitor and control executing codeml tasks; re-run datasets which might not have correctly finished and last but not least, receive an email notification when results are ready. To our knowledge, currently there is no other software that combines in one all the described codeml models. LMAP has been developed as an open-source command-line and interactive package of tools, allowing its integration into more complex open-source bioinformatics pipelines.
Availability and requirements
Project Name: LMAP
Project Home Page: http://lmapaml.sourceforge.net/
Operating System: Linux/UNIX and MacOS
Programming Language: Perl
Other Requirements: codeml (PAML package version (minimum) 4.6), CPAN modules (IO::All, Email::MIME, Email::Sender, Sys::Info, Term::Readkey, Thread::Semaphore, Statistics::Distributions, Math::Cephes, Bio::TreeIO, File::Copy, File::Copy::Recursive), screen and sendmail UNIX command-line utilities.
License: GNU General Public License, version 3.0 (GPLv3)
Any restrictions to use by non-academics: no restrictions except the ones stated in GPLv3.
The LMAP package provides two additional applications to easily enable LMAP functionality and installation: (i) the install.pl to enable the installation of all CPAN modules and utilities and (ii) the configure.pl to enable the configuration of LMAP package. A manual with detailed instructions is included in the archive to allow LMAP user-friendly installation and application.
Bayes empirical bayes
Branch related models (BM, BSM and CM)
Clade model C
Comprehensive Perl archive network
Central processing unit
- d N :
Number of non-synonymous substitutions
- d S :
Number of synonymous substitutions
GNU’s Not Unix!
GNU general public license version 3.0
Global resource and information database
Graphical user interface
Interactive display for evolutionary analyses
Integrated multiprogram platform to analyze and combine tests of selection
Java codon delimited alignment
Lightweight multigene analyses in PAML
Likelihood ratio test
Model alternative (with ω = 1)
Multiple sequence alignment
National Center for Biotechnology Information
Phylogenetic analysis by maximum likelihood
Practical extraction and report language
Prokaryotic selection pressure
Two-ratio constrained model (with ω = 1)
Two-ratio unconstrained model
Very large-scale evolutionary and selective pressure analyses
Swanson WJ. Adaptive evolution of genes and gene families. Curr Opin Genet Dev. 2003;13(6):617–22.
Haussler D, O'Brien SJ, Ryder OA, Barker FK, Clamp M, Crawford AJ, et al. Genome 10 K: a proposal to obtain whole-genome sequence for 10,000 vertebrate species. J Hered. 2009;100(6):659–74. doi:10.1093/jhered/esp086.
Koepfli KP, Paten B, Antunes A, Belov K, Bustamante C, Castoe TA, et al. The Genome 10K Project: a way forward. Annu Rev Anim Biosci. 2015;3:57–111. doi:10.1146/annurev-animal-090414-014900.
Anisimova M, Kosiol C. Investigating protein-coding sequence evolution with probabilistic codon substitution models. Mol Biol Evol. 2009;26(2):255–71. doi:10.1093/molbev/msn232.
Yang Z. PAML 4: phylogenetic analysis by maximum likelihood. Mol Biol Evol. 2007;24(8):1586–91. doi:10.1093/molbev/msm088.
Yang Z, Nielsen R, Goldman N. In defense of statistical methods for detecting positive selection. Proc Natl Acad Sci U S A. 2009;106(36):E95. doi:10.1073/pnas.0904550106. author reply E6.
Yang Z, dos Reis M. Statistical properties of the branch-site test of positive selection. Mol Biol Evol. 2011;28(3):1217–28. doi:10.1093/molbev/msq303.
Weadick CJ, Chang BS. An improved likelihood ratio test for detecting site-specific functional divergence among clades of protein-coding genes. Mol Biol Evol. 2012;29(5):1297–300. doi:10.1093/molbev/msr311.
Zhai W, Nielsen R, Goldman N, Yang Z. Looking for Darwin in genomic sequences--validity and success of statistical methods. Mol Biol Evol. 2012;29(10):2889–93. doi:10.1093/molbev/mss104.
Gharib WH, Robinson-Rechavi M. The branch-site test of positive selection is surprisingly robust but lacks power under synonymous substitution saturation and variation in GC. Mol Biol Evol. 2013;30(7):1675–86. doi:10.1093/molbev/mst062.
Schott RK, Refvik SP, Hauser FE, Lopez-Fernandez H, Chang BS. Divergent positive selection in rhodopsin from lake and riverine cichlid fishes. Mol Biol Evol. 2014;31(5):1149–65. doi:10.1093/molbev/msu064.
Wong WS, Yang Z, Goldman N, Nielsen R. Accuracy and power of statistical methods for detecting adaptive evolution in protein coding sequences and for identifying positively selected sites. Genetics. 2004;168(2):1041–51. doi:10.1534/genetics.104.031153.
Yang Z, Wong WS, Nielsen R. Bayes empirical bayes inference of amino acid sites under positive selection. Mol Biol Evol. 2005;22(4):1107–18. doi:10.1093/molbev/msi097.
Yang Z. Likelihood ratio tests for detecting positive selection and application to primate lysozyme evolution. Mol Biol Evol. 1998;15(5):568–73.
Yang Z, Nielsen R. Synonymous and nonsynonymous rate variation in nuclear genes of mammals. J Mol Evol. 1998;46(4):409–18.
Yang Z, Nielsen R. Codon-substitution models for detecting molecular adaptation at individual sites along specific lineages. Mol Biol Evol. 2002;19(6):908–17.
Zhang J, Nielsen R, Yang Z. Evaluation of an improved branch-site likelihood method for detecting positive selection at the molecular level. Mol Biol Evol. 2005;22(12):2472–9. doi:10.1093/molbev/msi237.
Bielawski JP, Yang Z. A maximum likelihood method for detecting functional divergence at individual codon sites, with application to gene family evolution. J Mol Evol. 2004;59(1):121–32. doi:10.1007/s00239-004-2597-8.
Felsenstein J. Evolutionary trees from DNA sequences: a maximum likelihood approach. J Mol Evol. 1981;17(6):368–76.
Huelsenbeck JP, Rannala B. Phylogenetic methods come of age: testing hypotheses in an evolutionary context. Science. 1997;276(5310):227–32.
Swanson WJ, Nielsen R, Yang Q. Pervasive adaptive evolution in mammalian fertilization proteins. Mol Biol Evol. 2003;20(1):18–20.
Finn S, Civetta A. Sexual selection and the molecular evolution of ADAM proteins. J Mol Evol. 2010;71(3):231–40. doi:10.1007/s00239-010-9382-7.
Spady TC, Seehausen O, Loew ER, Jordan RC, Kocher TD, Carleton KL. Adaptive molecular evolution in the opsin genes of rapidly speciating cichlid species. Mol Biol Evol. 2005;22(6):1412–22. doi:10.1093/molbev/msi137.
Ramm SA, Oliver PL, Ponting CP, Stockley P, Emes RD. Sexual selection and the adaptive evolution of mammalian ejaculate proteins. Mol Biol Evol. 2008;25(1):207–19. doi:10.1093/molbev/msm242.
Zhao H, Ru B, Teeling EC, Faulkes CG, Zhang S, Rossiter SJ. Rhodopsin molecular evolution in mammals inhabiting low light environments. PLoS One. 2009;4(12):e8326. doi:10.1371/journal.pone.0008326.
Yoshida I, Sugiura W, Shibata J, Ren F, Yang Z, Tanaka H. Change of positive selection pressure on HIV-1 envelope gene inferred by early and recent samples. PLoS One. 2011;6(4):e18630. doi:10.1371/journal.pone.0018630.
Smith SA, Jann OC, Haig D, Russell GC, Werling D, Glass EJ, et al. Adaptive evolution of Toll-like receptor 5 in domesticated mammals. BMC Evol Biol. 2012;12:122. doi:10.1186/1471-2148-12-122.
Weadick CJ, Chang BS. Complex patterns of divergence among green-sensitive (RH2a) African cichlid opsins revealed by Clade model analyses. BMC Evol Biol. 2012;12:206. doi:10.1186/1471-2148-12-206.
Badouin H, Belkhir K, Gregson E, Galindo J, Sundstrom L, Martin SJ, et al. Transcriptome characterisation of the ant Formica exsecta with new insights into the evolution of desaturase genes in social hymenoptera. PLoS One. 2013;8(7):e68200. doi:10.1371/journal.pone.0068200.
Veilleux CC, Louis Jr EE, Bolnick DA. Nocturnal light environments influence color vision and signatures of selection on the OPN1SW opsin gene in nocturnal lemurs. Mol Biol Evol. 2013;30(6):1420–37. doi:10.1093/molbev/mst058.
Valle M, Schabauer H, Pacher C, Stockinger H, Stamatakis A, Robinson-Rechavi M, et al. Optimization strategies for fast detection of positive selection on phylogenetic trees. Bioinformatics. 2014;30(8):1129–37. doi:10.1093/bioinformatics/btt760.
Dungan SZ, Kosyakov A, Chang BS. Spectral tuning of killer whale (Orcinus orca) rhodopsin: evidence for positive selection and functional adaptation in a cetacean visual pigment. Mol Biol Evol. 2015. doi:10.1093/molbev/msv217.
Maldonado E, Khan I, Philip S, Vasconcelos V, Antunes A. EASER: Ensembl Easy Sequence Retriever. Evol Bioinformatics Online. 2013;9:487–90. doi:10.4137/EBO.S11335.
Steinway SN, Dannenfelser R, Laucius CD, Hayes JE, Nayak S. JCoDA: a tool for detecting evolutionary selection. BMC Bioinformatics. 2010;11:284. doi:10.1186/1471-2105-11-284.
Lord E, Leclercq M, Boc A, Diallo AB, Makarenkov V. Armadillo 1.1: an original workflow platform for designing and conducting phylogenetic analysis and simulations. PLoS One. 2012;7(1):e29903. doi:10.1371/journal.pone.0029903.
Xu B, Yang Z. PAMLX: a graphical user interface for PAML. Mol Biol Evol. 2013;30(12):2723–4. doi:10.1093/molbev/mst179.
Maldonado E, Sunagar K, Almeida D, Vasconcelos V, Antunes A. IMPACT_S: integrated multiprogram platform to analyze and combine tests of selection. PLoS One. 2014;9(10):e96243. doi:10.1371/journal.pone.0096243.
Egan A, Mahurkar A, Crabtree J, Badger JH, Carlton JM, Silva JC. IDEA: Interactive Display for Evolutionary Analyses. BMC Bioinformatics. 2008;9:524. doi:10.1186/1471-2105-9-524.
Moretti S, Murri R, Maffioletti S, Kuzniar A, Castella B, Salamin N, et al. gcodeml: a Grid-enabled tool for detecting positive selection in biological evolution. Stud Health Technol Inform. 2012;175:59–68.
Hongo JA, de Castro GM, Cintra LC, Zerlotini A, Lobo FP. POTION: an end-to-end pipeline for positive Darwinian selection detection in genome-scale data through phylogenetic comparison of protein-coding genes. BMC Genomics. 2015;16:567. doi:10.1186/s12864-015-1765-0.
Webb AE, Walsh TA, O'Connell MJ. VESPA: Very large-scale evolutionary and selective pressure analyses. PeerJ Preprints. 2016;4:e1895v1. doi:10.7287/peerj.preprints.1895v1.
Su F, Ou HY, Tao F, Tang H, Xu P. PSP: rapid identification of orthologous coding genes under positive selection across multiple closely related prokaryotic genomes. BMC Genomics. 2013;14:924. doi:10.1186/1471-2164-14-924.
Busset J, Cabau C, Meslin C, Pascal G. PhyleasProg: a user-oriented web server for wide evolutionary analyses. Nucleic Acids Res. 2011;39(Web Server issue):W479–85. doi:10.1093/nar/gkr243.
Stern A, Doron-Faigenboim A, Erez E, Martz E, Bacharach E, Pupko T. Selecton 2007: advanced models for detecting positive and purifying selection using a Bayesian inference approach. Nucleic Acids Res. 2007;35(Web Server issue):W506–11. doi:10.1093/nar/gkm382.
The Perl Programming Language. www.perl.org. Accessed 8 Oct 2015.
The Comprehensive Perl Archive Network. http://www.cpan.org/. Accessed 8 Oct 2015.
Stajich JE, Block D, Boulez K, Brenner SE, Chervitz SA, Dagdigian C, et al. The Bioperl toolkit: Perl modules for the life sciences. Genome Res. 2002;12(10):1611–8. doi:10.1101/gr.361602.
Open Source - Sendmail.com. http://www.sendmail.com/sm/open_source/. Accessed 8 Oct 2015.
Screen User’s Manual. https://www.gnu.org/software/screen/manual/screen.html. Accessed 8 Oct 2015.
Weadick CJ, Loew ER, Rodd FH, Chang BS. Visual pigment molecular evolution in the Trinidadian pike cichlid (Crenicichla frenata): a less colorful world for neotropical cichlids? Mol Biol Evol. 2012;29(10):3045–60. doi:10.1093/molbev/mss115.
time - GNU Project - Free Software Foundation (FSF). http://www.gnu.org/software/time/. Accessed 8 Oct 15.
We would like to thank to Dr. Cameron J. Weadick from the Department of Evolutionary Biology at the Max Planck Institute for Developmental Biology, in Tübingen, Germany, for all the useful discussions and assistance with the use of PAML. We are thankful to the Associate Editor Dr. Todd James Treangen and to the three anonymous reviewers for their valuable comments and suggestions.
AA was partially supported by the Strategic Funding UID/Multi/04423/2013 through national funds provided by FCT and European Regional Development Fund (ERDF) in the framework of the programme PT2020, and the FCT project PTDC/AAG-GLO/6887/2014 (POCI-01-0124-FEDER-016845).
Availability of data and materials
All materials are included as additional files and in part included in the LMAP software archive, which is available to download from the project home page. The archive version here revised (LMAP version 1.0.0) is also available from the project home page or by request.
EM conceived and participated in the initial design, carried out implementation of the software, contributed with additional functionalities, debugging and software testing phases and drafted the manuscript. DA and TE participated in the initial design of additional functionalities, software testing phases and drafting of the manuscript. IK participated in the design of additional functionalities and software testing phases. VV contributed with materials and resources. AA conceived and participated in the initial design and coordination, contributed with materials and computational resources and drafting of the manuscript. All authors read and approved the final manuscript.
The authors declare that they have no competing interests.
Consent for publication
Ethics and consent to participate
Tables presenting templates definition and summary of models comparison. Table S1. SM templates defined by the codeml control file parameters values and summary of LRT comparisons. Table S2. BM templates defined by the codeml control file parameters values and summary of LRT comparisons. Table S3. BSM templates defined by the codeml control file parameters values and summary of LRT comparisons. Table S4. CM templates defined by the codeml control file parameters values and summary of LRT comparisons. (PDF 278 kb)
Figures exhibiting LMAP applications options. Figure S1. command-line options for gmap.pl application. Figure S2. interactive commands for gmap.pl application. Figure S3. command-line options for cmap.pl application. Figure S4. command-line options for mmap.pl application. Figure S5. command-line options for imap.pl application. Figure S6. command-line options for the omap.pl application. Figure S7. interactive commands for omap.pl application. Figure S8. command-line options for the main lmap.pl application. (PDF 4641 kb)
Resulting tables from LMAP execution of the included mitochondrial protein-coding genes dataset. Table S1. imap.pl results file from BM. Table S2. imap.pl results file from BSM. Table S3. imap.pl results file from CM. Table S4. imap.pl results file from SM. (XLSX 247 kb)
About this article
Cite this article
Maldonado, E., Almeida, D., Escalona, T. et al. LMAP: Lightweight Multigene Analyses in PAML. BMC Bioinformatics 17, 354 (2016). https://doi.org/10.1186/s12859-016-1204-5
- Adaptive evolution
- Software package
- Codon substitution models