.. _templatesearches: Template Searches =============== What is a template search ----------------------------------- A template search is a pre-defined query that we have created for you. A template search allows you to search the database without having to construct your own query or understand the underlying data structure. A library of template searches covering the full range of data is available. A template search consists of a simple form with one or more options for you to enter or select. Default values are always provided so you can immediately run them and see if they return the data you are after. Each template has a short name and a longer description. We provide a short name so you can quickly scan the available searches and find the one that you need. The longer description will provide you with more details and any limitations to the values you can enter. To access the template library click on the templates tab in the main menu bar. .. image:: ../_images/templatestab.png .. _filtertemplatesearches: Finding the template search that you want -------------------------------------------------------- The list of template searches is long. To help you find the search that you want you can filter the list using either keywords or data categories: .. image:: ../_images/templatesearch.png Can’t find what you want - please ask -------------------------------------------------- If you can’t find a template search that you want or if there is one available but it doesn’t quite return everything you are after please :ref:`contact`. Template searches can be created or modified and made available to you immediately, providing the data is available in the database. Use the **Contact us** form found on every InterMine page or email us at **support@flymine.org**. Running a template search ------------------------------------ A template search provides you with a form, with one or more variables to set. Some will require you to enter a value, while others will provide drop-down lists for you to select from. Some templates provide optional constraints. These constraints can be turned on or off as required. Once you are happy with your options, simply click **show results** to run the search. .. image:: ../_images/templateform.png .. _templatesearchelists: How do I run a template search with one of my lists or a public list? ----------------------------------------------------------------------------------------- First, **remember to log-in** so that your own lists can be viewed. Every template can be run on relevant :ref:`lists` of objects - if you have lists of the correct type (e.g. a list of genes) or if there is a suitable public list, you will be able to select the one you require from a drop-down list. You need to select the checkbox to access this. .. image:: ../_images/runtemplatewithlist.png Understanding your results ------------------------------------ Your template will return a results tables. As well as displaying your results, the results tables are a powerful analysis tool as well. See the :ref:`resultstables` for more details and for information on how to save or download your results. .. _templatemodify: Modifying a template search -------------------------------------- Sometimes you may find a template does not return everything you want in your results. Templates can also be a good starting point for building more complex searches. You can modify a template using the :ref:`querybuilder` - simply click on **Edit query** to display the template in the query builder. You need to understand how to use the query builder to modify your template - please see the :ref:`querybuilder` documentation. Remember, if you do not want to invest the time learning how to use the query builder you can :ref:`contact` the InterMine team who will be happy to help construct the search you require. .. image:: ../_images/edittemplate.png .. _buildatemplate: Building your own template search ----------------------------------------------- Coming soon…... TroubleShooting ---------------------- My template returns no results - why? All templates should return results with the default values provided (please :ref:`contact` if you find one that doesn’t). If you have provided your own values, in most cases it will mean we don’t have the data you are looking for. In some cases, however, particularly for more complicated searches with optional constraints, it may be because of the way the search is constructed - some of the required data may be there but not all of it, resulting in no results. If you have activated multiple optional constraints, it is often a good idea to turn these on individually to see if one in particular is causing the problem. By default adding a constraint means that the data MUST satisfy that constraint for the search to return results - see :ref:`outerjoin` for more details. Please :ref:`contact` if you require further assistance.