update January  8, 2006
NAME

leash - Call SeqHound methods from the command line

SYNOPSIS
leash -mn methodname [-mpi parameter | -mpf parameterfile  | -mpil parameterlist |
            -mpfl parameterfile ] -sep setchar -of outputfile
java -jar Leash.jar  options
DESCRIPTION
Leash is a wrapper that can call SeqHound API methods specified at the command line.  The idea is that rather than having to write a Java program, all you have to do is to provide the method name and arguments on the Leash command line, and Leash will call the method.

As currently-implemented, Leash is specialized for calling methods from the SeqHound API, designed by the BluePrint initiative at the Samuel Lunenberg Research Institute at the University of Toronto. The SeqHound API provides methods such as SHoundAccFromGi which converts an NCBI GI number to an accession number. The official SeqHound web site is at: http://www.blueprint.org/seqhound.

Leash does not have any of the SeqHound API method hard-coded into the program. Rather, Leash creats a SeqHound object, and looks to see if the method name specified by the -mn command line switch is the name of a SeqHound class. If it is a real class, Leash calls that class, using options supplied either on the command line (-mpi) or from a file (-mpf). Output is written either to the standard output or to an output file (-of). Because Leash does not hard-code any API methods, as new methods are added to an API, they are automatically available through Leash.

OPTIONS

-mn SeqHound method name
  (eg. SHoundProteinsFromOrganism, SHoundTaxIDFromGiList)

-mpi parameter|parameterlist
single parameter inline, or comma-separated list of parameters for 'List' methods

-mpf parameterfile
single parameter inline, or comma-separated list of parameters for 'List' methods

-mpil parameterlist
-mpfl parameterfile

Some SeqHound methods (eg.  SHoundGetFasta, SHoundSequenceLength, ) take a single parameter and return a single value. In many cases, there are similar methods that take lists as arguments and return lists (eg. SHoundGetFastaList). However, for other methods, there is no corresponding 'List' method, (eg. SHoundSequenceLength). Since it is innefficient to call Leash for each item in the list, use -mpil rather than -mpi. -mpil will iterate through the list, calling the method (eg. SHoundSequenceLength) for each item in the list, but returning a single list at the end. Where the list is read from a file, use -mpfl.

-sep   seperatorname
[ tab | comma | lf | colon | line]. For example, -sep comma would write output as a comma-separated list on a single line. The -sep option does not take the actual character. eg. "-sep ," is not accepted. Use "-sep comma".

-of    outfile
Output to a file. Default is to the standard output.


Not yet implemented:
-cp    path
Add to the classpath.
-cs     class
Use Class
-cci   class-constructor
Class Contructor Inline
-ccf   filename
Class Contructor from file
EXAMPLES

Example 1

leash -mn SHoundAllGenomes -of genomes.gi

writes a list of TaxonomyID numbers to genomes.gi.

Example 2

leash -mn SHoundExists -mpi 4646

produces the output

true

Example 3

leash -mn SHoundGetTaxNameFromTaxID -mpi 3888

produces the output

Pisum sativum

Example 4

leash -mn SHoundAccFromGiList -mpi 2463028,8698820

returns the list

AB045036
Y13670

Example 5

leash -mn SHoundGetTaxNameFromTaxIDByClass \
    -mpi 4081 -mpi SLRI_taxon_name_name_class_common_name

produces the output

tomato

Example 6

leash -mn SHoundSequenceLength -mpil 4646,2463028,8698820

returns the list

985
3467
18791

FILES
The current SeqHound implementation requires the file .shoundremrc to be present in either the current working directory or the user's home directory. A master copy of this file can be found in Leash/shoundremrc.
BUGS
 
AUTHOR
Anil Amarakoon
Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, MB  Canada R3T 2N2
frist@cc.umanitoba.ca
http://home.cc.umanitoba.ca/~frist