Molecular Evolutionary Genetics Analysis (MEGA) is computer software for conducting statistical analysis of molecular evolution and for constructing phylogenetic trees. It includes many sophisticated methods and tools for phylogenomics and phylomedicine. It is licensed as proprietary freeware. The project for developing this software was initiated by the leadership of Masatoshi Nei in his laboratory at the Pennsylvania State University in collaboration with his graduate student Sudhir Kumar and postdoctoral fellow Koichiro Tamura.Kumar, S., K. Tamura, and M. Nei (1993) MEGA: Molecular Evolutionary Genetics Analysis. Ver. 1.0, The Pennsylvania State University, University Park, PA. Nei wrote a monograph (pp. 130) outlining the scope of the software and presenting new statistical methods that were included in MEGA. The entire set of computer programs was written by Kumar and Tamura. The personal computers then lacked the ability to send the monograph and software electronically, so they were delivered by postal mail. From the start, MEGA was intended to be easy to use and include solid statistical methods only.

MEGA version 2 (MEGA2), which was coauthored by an additional investigator Ingrid Jakobson, was released in 2001.Kumar, S., K. Tamura, I. B. Jakobsen, and M. Nei (2001) MEGA2: Molecular Evolutionary Genetics Analysis. Ver. 2.0, Bioinformatics 17:1244-1245. All the computer programs and the readme files of this version could be sent electronically due to advances in computer technology. Around this time, the leadership of the MEGA project was taken over by Kumar (now at Temple University) and Tamura (now at Tokyo Metropolitan University). The monograph Molecular Evolutionary Genetics Analysis was often used as a textbook for new ways to study molecular evolution.

MEGA has been updated and expanded several times and currently all these versions are available from the MEGA website. The latest release, MEGA7, has been optimized for use on 64-bit computing systems. MEGA is in two version. A graphical user interface is available as a native Microsoft Windows program. A command line version, MEGA-Computing Core (MEGA-CC), is available for native cross-platform operation. The method is widely used and cited. With millions of downloads across the releases, MEGA is cited in more than 85,000 papers. The 5th version has been cited over 25,000 times in 4 years.Tamura, K., Stecher, G., Peterson, D., Filipski, A., Kumar, S. (2013) MEGA6: Molecular Evolutionary Genetics Analysis Version 6.0. Mol. Biol. Evol. 30:2725-2729.

Features Sequence alignment construction Alignment Editor ― Within MEGA, the Alignment Editor is a tool that may be used for editing and building multiple sequence alignments. The Alignment Editor in MEGA includes an integrated tool for both ClustalW and MUSCLE programs. All actions take place in the Analysis Explorer, which can be found in the main menu of MEGA. When a new alignment is being created, the user is presented with three options: create a new alignment, open a saved alignment session, or retrieve sequences from a file (importing sequences from NCBI). Once an option is selected, the user can choose either ClustalW or MUSCLE from the Alignment tab located at the top of the page. Parameters for the selected alignment program can then be specified and a progress bar will appear while the tool is being computer. Aligned sequences will replace unaligned ones in the main section of the Alignment Editor. To perform further analysis in MEGA, it is advisable to save the alignment session in either MEGA or FASTA format.

Trace Data File Viewer/Editor ― The Trace Data File Viewer/Editor has many functionalities in the following three menus. All the commands are used to help specialize searches and alignments in MEGA. Data Menu consists of Open File in New Window, Open File, Save File, Print, Add to Alignment Explore, Export FASTA File, and Exit. Edit Menu consists of Undo, Copy, Mask Upstream, Mask Downstream, and Reverse Complement. The difference between Mask Upstream and Mask Downstream is upstream is used to mask/unmask a region to the left of a cursor while downstream does the opposite. Reverse Complement will be used in situations where the complements may need to be reversed in a sequence. Search Menu consists of Find, Find Next, Find Previous, Next N, Find in File, and DO BLAST Search. The Find, Find Next, and Find Previous are used to find occurrences in certain sections of a query sequence. Next N is a command the will be able to go to the next indeterminate (N) nucleotide. Find in a File allows a user to search another file for selected sequences. Do BLAST Search command will perform a BLAST search in a separate web browser. The user may be able to either select certain date to BLAST or all sequences in the session will be used.

Integrated web browser, sequence fetching ― MEGA comes with a built-in web browser that allows users to access GenBank sequence data from the NCBI website. The integrated web browser can be accessed when creating a new alignment in the Alignment Editor. To successfully use sequences from NCBI, it is advised to change the searches to FASTA format and use the “Add to Alignment” button. Once completed, all the sequences will be imported into the MEGA application.

Multiple sequence alignment

Data handling One of the challenges associated with evolutionary genetic analysis is the presence of ambiguous states such as R, Y, and T. These states often arise from sequence errors or incomplete datasets. However, MEGA offers several resources to handle ambiguous states, including the deletion of sites that have an ambiguity score higher than the Site Coverage Cutoff parameter.

MEGA's extended format allows users to save all data attributes, such as sequence length, nucleotide positions, gaps, and ambiguous states. Additionally, MEGA supports data import from other formats, such as Clustal, which ensures a seamless transition between popular file types.

After importing a dataset, MEGA provides multiple different data viewer options. For example, users can view statistical attributes and select subsets in the Sequence Data Explorer or use the Distance Data Explorer to inspect pairwise distance data. Another feature of MEGA is the visual specification of domain groups. This allows users to group sequences by a specific characteristic and view subsequent phylogenetic trees.

Genetic code table MEGA offers support for modifying the genetic code used for translating DNA sequences. By default, MEGA has 23 built-in genetic code variations including the standard code, vertebrate mitochondrial code, Drosophila mitochondrial code, and yeast mitochondrial code. Users may add, remove, or edit any genetic code table. List of built-in genetic codesGenetic code nameStandardVertebrate MitochondrialInvertebrate MitochondrialYeast MitochondrialMold MitochondrialProtozoan MitochondrialCoelenterate MitochondrialMycoplasmaSpiroplasmaCiliate NuclearDasycladacean NuclearHexamita NuclearEchinoderm MitochondrialEuplotid NuclearBacterial PlastidPlant PlastidAlternative Yeast NuclearAscidian MitochondrialFlatworm MitochondrialBlepharisma MitochondrialChlorophycean MitochondrialTrematode MitochondrialScenedesmus obliquus MitochondrialThraustochytrium Mitochondrial

In addition, MEGA can also compute the degeneracy of each codon position in a genetic code table as well as the number of synonymous sites and non-synonymous sites using the Nei-Gojobori method.

Real-time caption expert engine

The Caption Expert is a part of MEGA which provides publication-like detailed captions based on the properties of analysis results. It is a tool that may be used for distance matrix, phylogeny, tests, etc. within MEGA (megasoftware).

Integrated text file editor

MEGA's integrated text file editor enables users to edit text files without the need for another program. Features like columnar block selection-editing aid in the performance of bulk operations, like changing letter case or font size. Additionally, the editor includes line numbers to assist with the navigation of large files and identifying areas of interest.

MEGA also provides several tools to format sequences. For example, the built-in reverse complement utility reverses the order of characters and replaces each with its complement.

The screenshots demonstrate the use of MEGA's reverse complement tool. The original sequence was reversed and each nucleotide was replaced with its complement to produce the reverse complement.

Sequence data viewer MEGA provides a graphical interface for displaying and manipulating aligned nucleotide and protein sequences. The Sequence Data Explorer has multiple menu functionalities to help with exporting data, searching alignments, changing display features, highlighting sites, and computing statistics: Data Menu consists of Write Data to File, Translate/Untranslate, Select Genetic Code Table, Setup/Select Genes and Domains, Setup/Select Taxa and Groups, Quit Data Viewer. Translate/Untranslate and Select Genetic Code Table is only available for nucleotide sequences. Search Menu consists of Find Motif, Find Next, Find Previous, Find Marked Site, and Highlight Motif. Display Menu consists of Show Only Selected Sequences, Use Identical Symbol, Color Cells, Sort Sequences, Restore Input Order, Show Sequence Name, Show Group Name, and Change Font. Highlight Menu consists of Conserved Sites, Variable Sites, Parsimony-Informative Sites, Singleton Sites, 0-fold Degenerate Sites, 2-fold Degenerate Sites, and 4-fold Degenerate Sites. Statistics Menu consists of Nucleotide Composition, Nucleotide Pair Frequencies, Codon Usage, Amino Acid Composition, Use All Selected Sites, Use only Highlighted Sites, Display Results in Spreadsheet (Excel or Libre/Open Office), Display Results in Comma-Delimited (CSV), Display Result in Text Editor.

MCL-based estimation of nucleotide substitution patterns Substitution Models in MEGA allow various options with different attributes of substitution models for both DNA and protein sequences. You may choose different substitution types, model, etc. to fit best with chosen data. The three main substitution models are 4x4 Rate Matrix, Transition-Transversion Rate Ratio (k1,k2), and Transition-Transversion Rate Bias of R.

Transition-Transversion Rate Ratios (k1, k2) – Transition-Transversion Rate Ratio calculates the ratio rate of Transition(a) to Transversion(b) using the formula k = a/b.

Transition-Transversion Rate Bias (R) — Transition-Transversion Rate Bias of R in MEGA calculates the ratio of the number of transitions to the number of transversions between a pair of sequences. MEGA allows a user to conduct an analysis of the data with a specified value of R. A key takeaway is when R equals 0.5, it means there is no bias towards either a transition or transversion substitution.

Substitution pattern homogeneity test MEGA offers several approaches for testing substitution pattern homogeneity, such as composition distance, disparity index, and Monte Carlo tests. These methods are used to determine if different genetic regions evolved under the same selective pressure.

Computation distance measures the variation in nucleotide composition between two sequences. MEGA computes this figure per site and excludes any gaps or missing data. A larger distance suggests that the regions evolved under different selective pressures.

The disparity index evaluates the difference in substitution patterns for a given pair of sequences. This value is calculated per site and is thought to be more dynamic than the chi-square test. A large difference implies that the pattern of substitution was not the same for the given pair of sequences.