Every MyHits cgi-bin accepts a list of key=value pairs as input parameters. These can be passed using GET or POST methods. The latter is obviously recommended when some "free text" must be passed.
There are some (flexible) rules about the available keys and their associated values. We have attempted to summarize them below.
There are some (flexible) rules about the available keys and their associated values. We have attempted to summarize them below.
THE ACTION KEY
action=<an_action_name>
is the most important key=value pair. It affects the overall behavior of most cgi-bin. For example, the pattern_search cgi-bin accepts the action value 'query' to produce the query form, and 'search' to actually perform the database request and return the result page.- A 'query' action is usually issued by default if no one is supplied.
- The protein_hub accept more than twelves different actions, these will not necessarily be stable in time, hence the need for a hub!
DATA RETRIEVAL METHODS
Possibly all cgi-bin expect input data... and many of them are waiting for a possibly large blob of data, e.g a list of proteins or an MSA. A few keys are reserved for that purpose: the following incoming parameters are searched sequentially for the first one which is not empty:text=<full text>
then the cgi-bin reconstitutes the full incoming text (whatever its source) and passes it to one of the parsers described below in this document.This is an example of HTML code that uses the 'text' parameter to pass some text to the protein_hub:
<form action="https://myhits.isb-sib.ch/cgi-bin/protein_hub" method="post"> <textarea name="text" rows="6" cols="55"></textarea><br/> <img src="https://myhits.isb-sib.ch/images/myHits.png" alt="myHits" /> <input type="submit" name="action" value="to protein HUB" /> </form>
item=<single ID>
multiple copies are expected (a list of).This other example uses multiple 'item' checkboxes:
<form action="https://myhits.isb-sib.ch/cgi-bin/protein_hub" method="post"> <input type='checkbox' name='item' value='sw:VAV_HUMAN' />sw:VAV_HUMAN<br/> <input type='checkbox' name='item' value='sw:VAV_MOUSE' />sw:VAV_MOUSE<br/> <input type='checkbox' name='item' value='sw:VAV_RAT' />sw:VAV_RAT<br/> <img src="https://myhits.isb-sib.ch/images/myHits.png" alt="myHits" /> <input type="submit" name="action" value="to protein HUB" /> </form>
data=<some identifier>
this is primarily used internally within MyHits.psa=<single PSA>
multiple copies are expected (a list of).In addition, for cgi-bin that expect an MSA, the multiple item are replaced with 'psa'.
The PSA format is a variant of the well known FASTA format where every sequence is expected to have a constant number of 'match' states (encoded using uppercase letters and '-') and a variable number of insert (encoded using lowercase letters).
The incoming sets of sequences in PSA format is converted on the fly into an MSA using the psa2msa program of the PFTOOLS package.
This is an example that send an MSA to the MSA hub. By playing with the checkboxes you can observe how the PSAs are reformatted on the fly:
<form action="https://myhits.isb-sib.ch/cgi-bin/msa_hub" method="post"> seq 1 <input type='checkbox' name='psa' value='>seq_1 XXiiiXXXXXXXXXX' /><tt>XXXiiiXXXXXXXXX</tt><br/> seq 2 <input type='checkbox' name='psa' value='>seq_2 XXXXiiiXXXXXXXX' /><tt>XXXXiiiXXXXXXXX</tt><br/> seq 3 <input type='checkbox' name='psa' value='>seq_3 XXXXXXXXiiiiXXXX' /><tt>XXXXXXXXiiiiXXXX</tt><br/> seq 4 <input type='checkbox' name='psa' value='>seq_4 XiX--XiiX-XiiX-XiX' /><tt>XiX--XiiX-XiiX-XiX</tt><br/> <img src='https://myhits.isb-sib.ch/images/myHits.png' alt='myHits' /> <input type='submit' name='action' value='to MSA HUB' /> </form>
PARSING DATA
The following context definitions are used when parsing incoming parameters:a list of identifiers
- The parser reads as many tokens as possible using the regular expression
/([\w\-\.\:]+)/g
- There are upper limits on the number of incoming identifiers
a single multiple sequence alignment (e.g. psi_blast)
- The parser accepts FASTA and CLUSTALW formats for multiple sequence MSA
- The parser also accepts an msa identifer from MyHits (e.g. mymsa:TOTO1)
- In addition, the parser accepts a single sequence given as an identifer (e.g. sw:VAV_RAT), a subsequence (e.g. sw:VAV_RAT/120-130), or a raw sequence of at least 50 residues.
- There are upper limits on the number of sequences and residues for the incoming MSA