PCD exec files

From Bioinformatics.Org Wiki

Jump to: navigation, search

Click here to go back to: PCD


Proposal

At present, if a command is launched by exec, rather than run, the presence of any variables will make an empty menu pop up. We would like to implement functions in blreads such as Refresh (eg. Refresh.blmenu.exec), Delete, etc. which use %out% and %in% files to utilize content from the canvas, or replace contents of a canvas.

Starting point: BMain.java, ln 1072.

           if (pcdo.exec != null) {
               jmiresult.addActionListener(new CommandThread(pcdo.exec,
                       pcdo.widgetList));
           } else {
               jmiresult.addActionListener(new RunWindow(pcdo.name,
                       pcdo.widgetList, parent, image));
           }

This suggests that the PCDObject pcdo has a null exec field, even though we specified a command on the exec line. Why is that?

Dooh! Actually, PCD already lets you do this:

name   "DeleteFiles - delete selected files"
icon   "$BIRCH/public_html/images/birch_black_ico.png"
tip    "Delete selected files"
exec   "bltsv2name.py %in1% %in1%.tsv; bl_deletefiles.sh %in1%.tsv; bldirtab.py %out1%"       

var "in1"
    type        tempfile
    direction   in
    format      tsv
    save        false
    content     selection

var "out1"
    type        tempfile
    direction   out
    format      tsv
    save        false
    overwrite   true
    content     canvas

The problem was that I had put the var definitions BEFORE the exec line. The PCD parser wants the exec line just after the name/icon/tip lines, and before the Body lines, which define the parameters.

Personal tools
Namespaces
Variants
Actions
wiki navigation
Toolbox