MEGA-CC Overview
Description
MEGA-CC is the command-line interface for using MEGA and it is included
with the graphical interface (GUI). Most of the calculations that are
available in the graphical interface (MEGA-GUI) are also available in
MEGA-CC. However, all calculation results are saved to files on your computer
instead of being displayed using graphical tools. With MEGA-CC, you can
batch process data files, automate calculation workflows, and integrate
MEGA into analysis pipelines.
MEGA-CC
Input Data Files
In order
to run MEGA-CC, a minimum of two input files are required - a MEGA Analysis
Options (.mao) file and one or more data files that are to be analyzed:
- MEGA Analysis Options file
- Specifies the calculation and desired settings.
- Created using MEGA-GUI.
- Has a .mao file extension.
- Data file (one or more of the following)
- Multiple sequence alignment in MEGA or Fasta format.
- Distance matrix in MEGA format.
- Unaligned sequences in Fasta format (for sequence alignment
only).
- Newick tree file (required for some analyses)
- Calibrations file (for timetree analysis – but it’s optional)
- Groups file (required for timetree analysis, optional for some
other analyses)
MEGA-CC Output Files
All results produced by MEGA-CC are written to files on your computer:
- In general, two kinds of output files are produced
- Calculation-specific results file (Newick file, distance matrix,…).
- A summary file with additional info (likelihood, SBL,…).
- Some analyses produce additional output (bootstrap consensus tree,
csv files, etc…).
- Output directory/filename
- Default is the same location as the input data file.
- Specify an output directory and/or file name using -o option.
- If no output filename is specified, MEGA-CC will assign a unique
name.
- Errors/warnings
- If MEGA-CC produces any errors or warnings, they will be logged
in the summary file.
Generating
a MEGA Analysis Options file
- Set MEGA-GUI to Prototype
mode by clicking the Prototype
button on the main form
- Specify a data type that will be used
by selecting from a drop-down list
- Select an analysis to run from one of
the menus on the main form
- Select analysis options in the Analysis Preferences Dialog
- Click the Save
Settings button and save to the .mao file to your computer
(most likely in the same directory as the data files to be analyzed)
Running MEGA-CC
There
are multiple ways in which MEGA-CC can be used:
- Easiest to run using command-line or batch scripts:
- megacc –a settings.mao –d
alignment.meg –o outFile
- Can also be run using custom scripts (Perl, Python, …):
- exec(‘megacc –a options.mao
–d alignment.meg –o outFile’);
- Integrated File Iterator system can process multiple files without
the need for using scripts (see Demo2 below)
- In addition, other applications can launch MEGA-CC:
- status = CreateProcess(“path/to/megacc…”);
- To see a list of available command options, call megacc from a
command-line prompt with the –h flag (Unix users can view the man
page).
See Also: A quick tutorial
for using MEGA-CC.