Setting Context (Why do I always get the taxonomy view exported, if I am trying to get KEGG/abundances?)


#1

The command-line mode is similar to the interactive mode. Even if you suppress the windows to be opened (read TODO to learn how to do that), they still exist in the form of different contexts.

This means, if you want to open an existing RMA-file in command-line mode just to save the view of the KEGG assignments you need to think of this as five steps.

  1. Open the file example.rma6
  2. Select the nodes you want to show up (we try all leaves)
  3. Open the KEGG Viewer (or context)
  4. Change the current context (Main Window) to the KEGG Viewer (KEGG)
  5. Safe the file to KEGG.png

As part of a command-line script it would look like this:

open file=‘example.rma6’;
select nodes=leaves;
open viewer=KEGG;
set context=KEGG;
exportImage file=‘KEGG.png’ format=png visibleOnly=false textAsShapes=true title=KEGG replace=true;

If you forget to change the context to the one you want to work in you will for example see the wrong images being exported (it will always export the Main Window) or the wrong nodes to be selected (always taxonomic nodes, not functional ones).

TODO: Screenshots