MEGAN 6.2.5+ (and also MEGAN 5.11.2+) has a new Export to STAMP feature that allows one to export taxonomic or functional profiles as a STAMP profile (.spf) file.
This then, together with an exported Metadata file, can be opened directly in STAMP.
Counts for the selected nodes are exported. When exporting a functional profile, all counts are placed on the same "level".
When exporting a taxonomic profile, the user is asked whether all levels above the selected nodes should be exported. Note that when choosing this method, MEGAN only exports the counts for the selected nodes (together with the names of the taxa that lie above the selected nodes) and not the counts for the nodes that lie above the selected ones. If you want to use all counts, then first use the Options->Taxonomic Profile menu item to project all counts down the lowest taxonomic rank of interest (e.g. Species or Genus, etc).