[BioRuby] BestPracties for wrappers

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Tue Mar 1 18:03:37 UTC 2011


Hi Raoul,

There are choices about input/output data and the wrapper API.
It would depend on both desired design of the API and the
implementation of the program, and it is not easy to determine
what is really the best.

1. Input data of the wrapper API
 * Bio::* or Ruby object (e.g. Bio::Sequence object)
 * String containing data (e.g. fasta format sequence text)
 * File name as a String

2. How to pass input data to the program
 * Stdin
 * File name supplied as a command-line option
 * File name described in a configuration file

3. The way of passing optional parameters to the program
 * Stdin
 * Command-line arguments
 * Configuration file

4. How to get output data from the program
 * Stdout
 * Stderr
 * File name supplied as a command-line option
 * File name described in a configuration file
 * Fixed file name

5. Returned data type of the wrapper API
 * Bio::*::Report object for the program
 * String containing data (e.g. sequence alignment, newick tree)
 * Bio::* or Ruby object (e.g. Bio::Sequence)

For 1 and 5, input/output data format can be converted inside
the wrapper, and two or more choices can be accepted by using
separate API.

The 2,3 and 4 would depend on the program, but some program have
two or more ways to specify and to pass the input/output data.

I'd like to try to find ways to standardize and unify BioRuby
wrappers, but not yet implemented.

Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org

On Mon, 28 Feb 2011 17:07:54 +0100
Raoul Bonnal <bonnalraoul at ingm.it> wrote:

> Dear Goto-san,
> if I would write a new wrapper for a new program, using Bio::Command libs, which are the best practies ?
> looking into the other wrappers the code is not always, let' say "standard"
> Could you give me some hints ?
> 
> --
> Ra
> 
> linkedin: http://it.linkedin.com/in/raoulbonnal
> twitter: http://twitter.com/ilpuccio
> skype: ilpuccio
> irc.freenode.net: Helius
> github: https://github.com/helios
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby





More information about the BioRuby mailing list