MEGAN ('MEtaGenome ANalyzer') is a computer program that allows optimized analysis of large metagenomic datasets.

Note: Xming X on Windows or X11 on OS X to use MEGAN.

How to install MEGAN

Note: to use MEGAN, you must first obtain a license key here:

Note: to install Megan on Windows, download the Windows installer, run it, and follow the on-screen inscructions.

To install MEGAN on the Unix HPC systems, first download the script from the MEGAN site:

Right click the link that says "" and click "Copy Link Address".

In your terminal, enter wget, then a space, then paste the path you copied. Press enter.

Launch the script by typing (in the terminal) ./[MEGAN_SCRIPT_NAME]. Replace [MEGAN_SCRIPT_NAME] with the name of the file that was downloaded.

When the installer pops up, continue until you can choose where to install it. You can use the default location or choose a different location if you have a preference. If you have a bin directory in your home directory for your software, you can choose at Add Symlinks to that directory when the installer asks. Otherwise, uncheck the box tha>

How to run MEGAN

To run MEGAN, navigate to the directory in which you have installed MEGAN. Enter ./MEGAN to open MEGAN.

How to import Blast reads into MEGAN

The file should be in the default BLAST format to ensure they are compatible with MEGAN. Other BLAST formats have different levels of compatibility, see the official MEGAN documentation for what exactly is supported in your version of MEGAN.

Once MEGAN is open, go the the File menu and choose "Import From BLAST". In the first pane, "Specify the BLAST file to import", click the folder icon and browse to your BLAST file. Click Next Step to move to the next pane.

Here you can specify a Fasta file containing the reads that were used in the BLAST. This is NOT required with the default BLAST output format because the sequences are already contained in the BLAST file. Importing a Fasta file with a BLAST file that already contains the reads will result in duplicates being reported. Either choose your Fasta file or leave this pane blank. Click Next Step.

Here you will chose the MEGAN file that will be saved after importing the reads. Make sure you have enough space to hold the resulting MEGAN file, it can be almost as large as the BLAST result file so keep that in mind. Note that it is saved automatically after it imports the reads so you don't need to manually save the file before closing MEGAN after this process. Choose a file and click Apply.

A progress bar will appear on the screen. Once it is finished your data will be displayed.

How to import large BLAST datasets into MEGAN

When you launch MEGAN using SSH, your user is only allocated a relatively small amount of resources for MEGAN. This can be fine for importing smaller BLAST files (< 1GB) but MEGAN will crash if it uses too much RAM which causes importing large datasets to fail. So we use the PBS scripting system in "interactive mode".

In SSH, enter qsub -I -X and press enter. This queues an interactive job. Wait until the job starts. You would be in your home directory and the prompt will have changed. Navigate to the MEGAN install directory and run MEGAN. Import the BLAST files as usual.