Child pages
  • Metainformation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The block starts with the visual keyword. It describes the appearance of the workflow in a Workflow Designer window, i.e. appearance of the workflow elements and connections:

Code Block
visual {

    # Elements appearance
    element_name1 {
        element_appearance_parameter1:value1;
        element_appearance_parameter2:value2;
        ...
    }
    element_name2 {
        ...
    }
    ...


    # Connections appearance
    element1_name.port1_name->element2_name.port2_name {
        connection_appearance_parameter1:value3;
        ...
    }
    ...
}

To describe an element appearance the following parameters are used:

  • description — description of the element in the Property Editor. It is in HTML format.

  • tooltip — tooltip shown on the element.

  • pos — position of the element, assuming that bottom right corner of the window is (0, 0) position.

  • style — style of the element. The following values are available:

    • ext — for extended element style
    • simple — for minimal element style
  • bounds — defines the bounds of the element rectangle in the extended style.
  • bg-color-ext — color of the element in the extended style. The color must be specified in the RGBA format.
  • bg-color-simple — color of the element in the minimal style.
  • port_name.angle — position of the port on the element. Here the port_name must be replaced by the name of the port.

For now, the only parameter that describes a connection appearance is:

  • text-pos — position of the text near the connection arrow.

For example:

Code Block
visual {
    read-sequence {
        description:"";
        tooltip:"Reads sequences and annotations ...";
        pos:"-930 -885";
        style:ext;
        bg-color-ext:"0 128 128 64";
        bounds:"-30 -30 45 103";
        out-sequence.angle:272.309;
    }
    write-sequence {
        ...
    }
    read-sequence.out-sequence->write-sequence.in-sequence {
        text-pos:"-27.5 -24";
    }
Estimations

The block starts with the estimations keyword and has the following format:

Code Block
estimations {
function samtoolsTime(bam, ref) {
                return (ref/236) * (25*bam + 4);
            }
			function samtoolsRAM(bam, ref) {
                return (ref + 50);
            }
            var bamSets = utils.attributeValue("read-assembly.url-in");
			var refSets = utils.attributeValue("read-sequence.url-in");
            var time = 0;
            var ram = 0;
            for (var i=0; i<bamSets.length; i++) {
                var bamSet = bamSets[i];
                var bam = 0; // size of bams in Mb
                for (var j=0; j<bamSet.length; j++) {
                    var url = bamSet[j];
                    bam += utils.fileSize(url) / (1024*1024);
                }
				var refUrl = refSets[i][0];
				var ref = utils.fileSize(refUrl) / (1024*1024);  // size of ref in Mb
                time += samtoolsTime(bam, ref);
                ram += samtoolsRAM(bam, ref);
            }
            [time, ram];
        }
        

The value specified for an element parameter is used as the alias for this parameter when the workflow is executed from the command line.

See an example of setting workflow aliases:

Code Block
.meta {
    parameter-aliases {
        read-msa.url-in:in;
        write-msa.url-out:out;
    }
    ...
}