You can add new child apps by editing the text file SeqPup.prefs. You will need to update the section [apps] with a new line for you new app, then install a new section, [newappname]. You will also need to increase the [version=#] value, as described above in the Installation section, for the program to take notice of your changes.
The [apps] section contains a list of child app sections, and the menu title string. E.g.,
clustal=ClustalW Multiple align...
The clustal= line says there is a child app section called clustal, and its menu title is "ClustalW Multiple align..."
Version 0.5 adds the form=path-to-html-form method for configuring child apps.
Forms are the recommended replacement to the following methods. This new feature needs documenting, but is still evolving. It follows the HTML forms standard, though not all HTML specs are implemented at this release.
See the example HTML forms in the apps folder to find how these work.
The following variable names have special meaning as Input tags of TYPE=hidden:
infile, seqformat, minseq, maxseq
outfile1, outfile2, .. outfilen
stdin, stdout, stderr, stdcmdin
The HTML <FORM> tag is used to specify command-line action and method to execute the child application. Currently Method=localexec is the only method supported. The Action="path-to-app command-line" statement can be as complex a statement as the operating system allows for executing programs. Include variable names using a dollar ($) in front of the name. In Unix, this can be a shell command (later refinements may add to this).
<FORM METHOD=localexec ACTION="$apps:clustalw
$align $tree $quick $boot $othercmd
Various HTML INPUT and Select and TEXTAREA tags are supported for user input. The NAME="varname" is the name of variable used within this form. You can use any unique name that suits, and typically you put this varname into the FORM ACTION=statement, or the INPUT NAME=stdcmdin value. The VALUE="something" is the value of variable that will be passed on to child app. Use the INPUT TYPE=submit to produce a button to launch the application. Here are some examples:
<INPUT TYPE="checkbox" NAME="tree" VALUE="/TREE">calculate NJ tree<p>
<INPUT TYPE="checkbox" NAME="boot" VALUE="/BOOTSTRAP"> Bootstrap NJ tree.
<INPUT NAME="bootval" VALUE=1000 SIZE=6> (# boostraps)<p>
Other options: <p>
<TEXTAREA NAME="othercmd" COLS=40 ROWS=2></TEXTAREA><p>
<INPUT TYPE=submit VALUE="Launch app">
Here are examples of the special TYPE=hidden variables that SeqPup understands:
<INPUT TYPE=hidden NAME=infile VALUE="$temp:clustal.inseq">
<INPUT TYPE=hidden NAME=seqformat VALUE="nbrf">
<INPUT TYPE=hidden NAME=minseq VALUE="2">
<INPUT TYPE=hidden NAME=outfile2 VALUE="$temp:clustal.outseq biosequence/msf">
<INPUT TYPE=hidden NAME=outfile1 VALUE="$temp:clustal.dnd biotree/newick">
The INPUT TYPE=hidden NAME=stdcmdin is a special tag. Use it when the application requires complex inputs from the standard input file. This currently is used with Phylip programs. It is free-form input of any text between double-quote (") symbols. Use line breaks where appropriate. Include variables using a dollar ($) with variable name.
A primitive IF-ELSE option is available with the dollar-question ($?varable) syntax. This will let you test if a variable like a check-box is selected. If it is selected, text following, including other variables will be inserted. If it isn't selected, additional text, or nothing, may be inserted. The basic syntax for this is
Here is an example:
<INPUT TYPE=hidden NAME=stdcmdin VALUE="M
NOTE: The following descriptions still should work, but may be eliminated in future versions.
Then the section for [clustal] includes these variables
desc= descriptive string, displayed in the launch dialog
path= path to application, using variables defined in [paths] section
help= path to help document, ditto
cmd= command line passed to application
infile= path/name of input data file, using variables defined in [paths] section
seqformat= format for sequence input data file
minseq= minimum number of sequences required for application
outfile1= first output file, and file format in pseudo-mime notation
outfile2= second output file, and file format in pseudo-mime notation
... etc... for more output files.
All the lines which specify file paths should use the variables defined in the [path] section for an easy way to make these descriptions portable to other systems. The [paths] section specifies variables for file paths then gives their complete specification on the local file system, e.g.,
Then in an application variable use the syntax "$pathvar:" to insert the local path variable. For example, use
This will be translated by the program to
If no path is specified, the default path will generally be, on Macintosh, where the program file was when launched, and on Unix and MSDOS, where the command line was executed from.
The command line variable "cmd" should specify files and other parameters that the child application needs to read.
The current selection of "seqformat" sequence input formats includes the following:
genbank, fasta, embl, nbrf, pir/codata, gcg, msf, phylip, paup/nexus, asn1.
The current selection of pseudo-mime notations known by SeqPup used to specify the return data formats includes biosequence formats, basic text and image formats:
biosequence/genbank, biosequence/fasta, etc.. for sequence formats
biotree/newick - newick style phylogenetic tree, not yet displayable
text/plain, text/rtf, text/html - text file formats
image/pict, image/gif - image file formats
Seqformat for the input file now is not in pseudo-mime format, but may change to that for consistency with output formats. That would be "biosequence/fasta" instead of just "fasta".