How to use my own taxonomic or functional classification in MEGAN?

In 2014, Dumont published LCA method classify pmoa gene with MEGAN ( I want to create my own classification in a similar manor. The authors of that paper describe two
mysterious files and pmoa.megan.2013.tre. I don’t know how to generate such files.

MEGAN allows your to define your own classification. In old versions of MEGAN, you could only replace the NCBI classification by your own. Now, MEGAN6 Ultimate Edition allows one to add a new classification in addition to existing ones.
MEGAN6 UE will generate a new window, extend the import blast dialog etc…

For this to work, you need to specify three files. Say you want to call your new classification amoa, then you need:

  1. - this contains a mapping of Amoa names to numbers- these names will appear as labels on the tree in MEGAN

  2. amoa.tre - this contains a definition of the classification of the tree in Newick format, in which all nodes (including internal ones, not just leaves), are labeled by numbers present in Each node should have a unique number, except leaves, where the same number can appear multiple times (for example, in a KEGG tree, the same KO may appear in multiple pathways).

  3. a file that maps GI numbers or strings in the header lines of your reference sequences to numbers in your file.
    For example, a file called or a file

Let me explain this using a mini example:
1 Root
2 Fruit
3 Apple
4 Banana
5 Veg
6 Carrot
7 Tomato
8 Potato


Apple 3
Jonagold 3
Granny Smith 3
Banana 4

Reference sequences:

Apple June 2015
Jonagold Germany
Granny Smith
Golden Banana

For MEGAN6 UE to incorporate your new classification, you simply need to place the and mini.tre files into the class/resources/files directory in your MEGAN6 UE installation and then (re)-start the program. You will see a new icon in the tool bar representing your new viewer and the Import from Blast dialog will show a new tab for you to setup import. Also, programs such as blast2rma, blast2lca and daa-meganizer will know about the new classification and will offer command line options to work with it.

1 Like


Do you also put the third file, the mappings from reference sequence to nodes in the tree in the class/resources/files directory?

No, you supply that as a synonyms file in the Import from Blast dialog.