getTemplateQuery {InterMineR} | R Documentation

## Get the query contained in a template

### Description

Get a template query for a mine. A template contain a saved query with a view and constraint. The user can modify this query to obtain the desired result. The view is a vector containing the output columns of the query. The constraint is a matrix containing the following columns: path (the path of the constraint), op (the constraint operator, one of '=', '!=', 'LOOKUP', 'ONE OF', 'NONE OF', '>', '<', '>=', '<=', 'LIKE'), value (the constraint value), code (the name of the constraint), extraValue (optional, required for LOOKUP constraints).

### Usage

    getTemplateQuery(im, name, timeout=3)

### Arguments

`im` | a list, containing the base URL and API token.
`name` | a string, representing the name of the pre-defined template.
`timeout` | an integer, representing the number of seconds to wait for the webservice to respond.

### Value

a list, reprenting the query contained in the pre-defined template. The list should contain at least two elements, view and constrain.

### Author(s)

InterMine Team

### Examples

    # Get template queries from HumanMine
    im <- initInterMine(listMines()["HumanMine"])

    queryGeneIden <- getTemplateQuery(im, "Gene_Identifiers")

[Package InterMineR version 1.10.0 Index]