function newWindow(url) { window.open(url, "sideWin", 'toolbar=no,location=no,scrollbars=yes,resizable=yes') } function newWindow2(url) { window.open(url, "sideWin2", 'toolbar=yes,location=yes,scrollbars=yes,statusbar=yes,menubar=yes,resizable=yes,personalbar=yes') } function subgif(form, addEl) { form.elements[form.elements.length-1].name = addEl form.submit() } function printText(str){ var ie4 = (document.all) ? true : false; var nn4 = (document.layers) ? true : false; mydiv = (ie4) ? div1 : eval(document.who); if (ie4){ mydiv.innerHTML = str } else if (nn4) { layer = document.layers['layer1'] doc = layer.document; anchor = document.layerAnchor layer.x = anchor.x layer.y = anchor.y layer.visibility = "show" doc.open('text/html') doc.write(str) doc.close(); } }
       
SRS Users Manual
Introduction to SRS
SRS Sessions
Querying With SRS
  3.1  Querying With SRS
  3.2  Querying
    3.2.1  Doing a Quick Search
    3.2.2  Browsing Databank Indices
    3.2.3  Using the Standard Query Form
    3.2.4  Using the Extended Query Form
    3.2.5  Doing an Expression Query
Linking
Views
Applications
Command Line SRS
The SRS Query Language 
3.2 Querying
  This section contains a tutorial allowing you to build on what you've already learned. The first thing you need to do before continuing is begin an SRS session. A temporary session will be sufficient for the purposes of this chapter. Click the "Start" link from the "Start" page. 

Note: Go to the "Starting an SRS Session" chapter now for information on the session options available.

 

Doing a Quick Search
  The "Quick Search" was defined earlier in this chapter; it allows you to search the selected databanks using the "AllText" data field. The following image shows the top part of the "Top" page. Near the centre of this page you will see a button labelled "Quick Search" with an input field to the right of the button.

FIGURE 10. Quick Search Query.
To do a "Quick Search":
 
 
  1. Select the databanks that you want to search.
  • Click the checkbox to the left of the databank name.
  1. Enter the search term in the textbox. 
  • Use a word or a regular expression, as discussed earlier.
  1. Click the "Quick Search" button. 
For this example we will search the SWISS-PROT databank for entries that have the word "cancer".

FIGURE 11. Quick Search Query.

Steps:

 
  1. Select the checkbox to the left of the SWISSPROT hyperlink.
  2. Type "cancer" into the "Quick Search" query textbox.
  3. Click "Quick Search". See figure 11.
The system will search the indices for the fields that belong to the "AllText" virtual field in SWISS-PROT and return a list of matches.
Browsing Databank Indices
  You can browse indices from the "Data Field Information" page.

 To get to a "Data Field Information" page:
 
 

From the Standard Query Form

 
  • There is a drop-down list on the "Standard" query form of all data fields available for a particular databank, select the data field that you wish to browse and click the "Info" button.
FIGURE 12. Info Button and Drop-down menu.

From the Extended Query Form

 
  • Each of the data fields on the "Extended" query form are highlighted indicating that they are hyperlinks. Click on the name of the field that you want to browse to go to that fields information page.
FIGURE 13. Go to the Information Page.

From the Databank Information Page

 
  • You will see a section devoted to data fields for that databank. Select one of those data field hyperlinks to go to its "Data Field Information" page.
FIGURE 14. The Databank Information Page.
For the example below we will search the SWISS-PROT databank for "hist*" in the "Description" data field.

FIGURE 15. The "Data Field Information" page.

Steps:

 
  1. Select the SWISSPROT link from the Databanks page or the Top page.
  • This will bring up the "Databank Information" page for SWISS-PROT.
  1. Select the data field that you want to browse.
  • This will bring up the "Data Field Information" page.
  1. Enter the search term, "hist*", in the input field. 
Note: Wild cards are allowed when browsing the data field but they are not automatically appended to the search term like with other query methods.
  1. Click the "List Values" button.
  • This will take you to the "Browse Index" page.
FIGURE 16. Browse the Index.
  1. Select the terms that best match your needs and click the "Make Query" button.
  • This returns entries that match the selected terms.
Using the Standard Query Form
  Query EMBL for entries about "insulin" that have been added to the databank after "January 1, 1998" using the "Standard" query form.

FIGURE 17. The "Standard" query form.
  1. Go to the "Top" page:
  • Click the "Top Page" tab.
  1. Select EMBL:
  • Click the checkbox to the left of the databank name.
  1. Click the "Standard" button.
  • This will bring up the "Standard" query form.
  1. Enter the search phrase.
  • In the main body of the "Standard" query form are four textboxes where you enter the query string. To the left of each textbox is a data field selector. Specify the query string as follows:
  1. Enter the word "insulin" in the first input field.
  2. The age constraint goes in the next input field. This will be formatted according to the SRS query language rules. Type "1-Jan-1998:" and change the data field selection to "Date".
  3. Ensure that the "Combine searches with" option is set to "AND".
  4. Click the "Submit Query" button.
In addition to specifying the number of entries SRS should display, you can define a view for the results. See the "Views" chapter to learn more.

Note: The databanks to search were chosen in the "Top" page. If you want to change the list of databanks to search go back there now to change your selections.

 

Using the Extended Query Form
  In an almost interview format the "Extended" query form allows you to enter search constraints or criteria about any of the data fields that are available. You just pick the databank or databanks that you want to search and start filling in the blanks. This time we will search the "Description", "Organism", "Date", and "Keyword" fields. (Use more if you want).
 
 

Steps:

 
  1. Click the "Top" page tab.
  2. Select the databank EMBL.
  1. Click the "Extended" button.
  • This takes you to the "Extended" query page. See figure 18.
FIGURE 18. Extended query form.
  1. In the "Description" field enter "histamine".
  2. In the "Keywords" field enter "histamine".
  3. In the "Organism" field enter "human".
  4. In the "Date" field pick the ">=" option. Enter "1-Jan-1998".
FIGURE 19. Completed fields.
  1. Click the "Submit Query" button.
Doing an Expression Query
  You can use the "Expression" query box to combine, link, or refine the results of existing queries.

FIGURE 20. Expression query box.

Steps:

 
  1. In the "Expression" query box, type "Q1 & Q2". 
  • This will filter through the results of "Q1" and "Q2" and return a new listing, "Q3", that has all entries that are in both "Q1" and "Q2". 
  1. Type "Q3 < SWISSPROT", to begin a linking operation.
FIGURE 21. Linking with an Expression
  • This will create Q4 which contains a listing of all the entries in Q3 that are also linked to the SWISS-PROT databank.
SRS 6.0.7.3