How to generate kegg pathways from an rma6 file without using gui

how to generate kegg pathways from an rma6 file without using gui

First, please note, to create KEGG pathways using MEGAN on the command line, you need to use the licensed Ultimate Edition.

Also, you may need to use xvfb to run MEGAN UE on a server.

Also, you need to prepare a script. The easiest why to do this is to first go through the steps that you would like to perform interactively with MEGAN UE, and then take a look at the Log Window: there MEGAN will echo the command-line commands that it is using to do what you request interactively.

For example, to create a PDF file containing the KEGG pathway 02010, I use this script:

open file='/Users/huson/data/asari/Alice00-1mio.daa';
openUE viewer=KEGG;
set context=KEGG;
show keggTab id=1002010;
exportImage file='/Users/huson/Desktop/kegg.pdf' format=pdf visibleOnly=false textAsShapes=true title=none replace=true;
quit;

To summarize, first “open” an input file then “openUE” the KEGG viewer, then “set” the “context” to the KEGG viewer (this tells MEGAN that subsequent commands are for the KEGG viewer), then use “show” to display a KEGG tab (note that in MEGAN pathway ids are “original-KEGG-pathway-id” + 1,000,000). Then “exportImage” the image, and “quit”.

To run this, the command line something will look like this:

megan -g -c save-kegg-image.txt -E -v

The resulting output should look something like this:

is it possible to create a PDF file containing all the KEGG pathway using a single command

This was previously not possible. However, this is a good idea and I have just implemented a command for doing this in MEGAN UE.

Open the KEGG viewer and use the menu item File->Export -> Export All KEGG Pathway Maps...
which will allow you to select a directory and then all pathway maps will be put there in PDF format.

The corresponding command-line command is:

exportPathways ids={id, id, ...|all} [format={pdf|svg|png}] [dir={output-directory}];

This will be available in the next release (later today)