Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Ruby library to aid the interaction with Taverna 2 workflows.

This branch is 119 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


= Taverna[] 2 Interaction Gem

Author::        Emmanuel Tagarira
Version::       0.0.2
Licence::       LGPL 3 (See LICENCE or
Copyright::     (c) 2008-2009 University of Manchester, UK

== Synopsis

This is a Ruby library to support the interaction with Taverna[] version 2 workflows (T2Flows).  This relies on the functionality provided by the libxml library.  To be able to utilise this gem to its full potential, you will need to have the following installed on your system.
- GraphViz[] (a graph visualization package)
- Rdoc gem
- Darkfish-Rdoc gem

== The T2Flow Model Implementation

Much like the Taverna[] 1 Scufl model, T2Flows contain Processors, Sinks, and Sources.  T2Flows however, encapsulate these elements within Dataflow objects.  A Dataflow objects is the container for all the different elements present within the Taverna[] 2 workflows, hence a single T2Flow may have one or more dataflows.  WorkflowDescriptions and Links, from the original Taverna[] 1 workflows (Scufl), have been renamed in T2Flows to DataflowAnnotations and Datalinks respectively.  DataflowAnnotations, however, allow for multiple titles, authors, and descriptions, as opposed to the single value attributes held for Scufls.

== Installation
To install the gems required by the Taverna 2 gem library, type into your command prompt:
  [sudo] gem install libxml-ruby
  [sudo] gem install rdoc
  [sudo] gem install darkfish-rdoc

When you have the required gems on your system, you may install this gem using the following commands:
  gem sources -a
  [sudo] gem install mannie-taverna-t2flow

== Usage

To be able to generate at least a T2Flow model using the gem, you need to include in your ruby code the following lines:
  require "t2flow/model.rb"
  require "t2flow/parser.rb"
To generate the model you can then use the gem as follows:
  foo ="path/to/workflow/file", "r")
  bar =

  foo ="path/to/workflow/file", "r").read
  bar =

You will then be able to use your T2Flow model to retrieve information about the workflow by invoking the different methods and attributes.
... where INVOKED is the method or attribute required.

You can also interact with remote workflows.
  require "open-uri"
  foo = Uri.parse("xxxx://uri_to_workflow").read
  bar =

To be enable you to draw images of the T2Flow, you need to include:
  require "t2flow/dot.rb"

To be able to use any functionality included in "t2flow/dot.rb", you need to have GraphViz[] installed on your system.  Once this package has been installed, you may use the gem to draw an image showing the structure of the T2Flow as follows.
  out_file ="path/to/file/you/want/the/dot/script/to/be/written", "w+"), bar)
  `dot -Tpng -o"path/to/the/output/image" #{out_file.path}`
The last line draws a PNG image using +out_file+.  To learn more about dot, try typing into your command prompt:
  % man dot
  % dot -h

== References

Something went wrong with that request. Please try again.