External Tool: Numerically adding two values with 'bc'.

Created: 2011-05-06 16:11:24      Last updated: 2011-05-06 16:22:18

The workflow is an examples for the External Tools / UseCase plugin to integrate external tools. It wraps the "bc" command line calculator. Internally, it executes the following script:

if [ ! -r "$1" ]; then
        echo "Cannot read file indicated by first argument '$1'." ;
        exit -1 ;
fi ;
if [ ! -r "$2" ];then
        echo "Cannot read file indicated by second argument '$1'." ;
        exit -1 ;
fi

if [ -x /usr/bin/bc ]; then
        a=$(cat $1|tr -d '\n') ;
        b=$(cat $2|tr -d '\n') ;
        echo "$a+$b" | bc | tr -d '\n';
else
        echo "The bc tool is not installed where expected, if installed at all." ;
        exit -1 ;
fi

To develop workflows in a similar manner, i.e. avoiding the specification of beans and gain complete flexibility for local or remote execution of the workflow, please follow instructions on http://www.mygrid.org.uk/dev/wiki/display/developer/Calling+external+commands+from+Taverna.

Information Preview

Information Run

Run this Workflow in the Taverna Workbench...

Option 1:

Copy and paste this link into File > 'Open workflow location...'
http://myexperiment.org/workflows/2105/download?version=1
[ More InfoExpand ]


Information Workflow Components

Information Authors (1)
Information Titles (1)
Information Descriptions (2)
Information Dependencies (0)
Inputs (2)
Processors (1)
Beanshells (0)
Outputs (2)
Datalinks (4)
Coordinations (0)

Information Workflow Type

Taverna 2

Information License

All versions of this Workflow are licensed under:

Information Version 1 (of 1)

Information Credits (1)

(People/Groups)

Information Attributions (0)

(Workflows/Files)

None

Information Tags (2)

Log in to add Tags

Information Shared with Groups (1)

Information Featured In Packs (0)

None

Log in to add to one of your Packs

Information Attributed By (1)

(Workflows/Files)

Information Favourited By (0)

No one

Information Statistics

 

Citations (0)

None


Version History

In chronological order:



Reviews Reviews (0)

No reviews yet

Be the first to review!



Comments Comments (0)

No comments yet

Log in to make a comment




Workflow Other workflows that use similar services (0)

There are no workflows in myExperiment that use similar services to this Workflow.