.. index::
   pair: browse; scheme profiles

***********************************
Browsing scheme profile definitions
***********************************
If a sequence definition database has schemes defined that include a primary 
key field, i.e. collections of loci that together create profiles, e.g. for 
MLST, these can be browsed by clicking the link 'By specific criteria' in
the 'Search for allelic profiles' section. 

.. image:: /images/data_query/browse_profiles.png

Leave query form fields blank (the display of these may vary depending on 
modification options set by the user).  Choose the field to order the results 
by, the number of results per page to display, and click 'Search'.

.. image:: /images/data_query/browse_profiles2.png

Clicking the hyperlink for any profile will display full information about the 
profile.

.. image:: /images/data_query/browse_profiles3.png

.. index::
   pair: query; scheme profiles

***********************************
Querying scheme profile definitions
***********************************
Click the link to 'By specific criteria' link in the 'Search for allelic
profiles' section.

.. image:: /images/data_query/browse_profiles.png

Enter the search criteria you wish to search on. You can add search criteria 
by clicking the '+' button in the 'Locus/scheme fields' section.  These can 
be combined using 'AND' or 'OR'. 

.. image:: /images/data_query/query_profiles2.png

Each field can be queried using :ref:`standard operators <query_operators>`.

Clicking the hyperlink for any profile will display full information about the
profile.

.. image:: /images/data_query/query_profiles3.png

Other query options are available by clicking the 'Modify form options' tab.

.. image:: /images/data_query/query_profiles4.png

For example, you can enter a list of attributes to query on by clicking the
'Show' button next to 'Attribute values list'. 

.. image:: /images/data_query/query_profiles5.png

A list box will appear within the page.  Hide the form modification tab by
clicking the 'X' in the corner or the purple tab again.  Now you can choose
the attribute to search on along with a list of values.

.. image:: /images/data_query/query_profiles6.png

List values will be combined with any other attributes entered in the query 
form allowing complex queries can be constructed.

You can also add filters to the form by again clicking the 'Modify form 
options' tab and selecting 'Filters'.

.. image:: /images/data_query/query_profiles7.png

Available filters will vary depending on the database.  These will be combined
with other query criteria or lists of attributes.

.. image:: /images/data_query/query_profiles8.png