run_query {RGMQL} | R Documentation

## Run a GMQL query

### Description

It runs a GMQL query into repository taken from file or inserted as text string, using the proper GMQL web service available on a remote server

### Usage

    run_query(url, queryName, query, output_gtf = TRUE)

    run_query_fromfile(url, filePath, output_gtf = TRUE)

### Arguments

`url` | string url of server: It must contain the server address and base url; service name is added automatically
`queryName` | string name of the GMQL query file
`query` | string text of the GMQL query
`output_gtf` | logical value indicating file format used for storing samples generated by the query. The possiblities are: GTF TAB
`filePath` | string path of a txt file containing a GMQL query

### Details

If error occurs, a specific error is printed

### Value

None

### Examples

    ## Not run:

    ## Login to GMQL REST services suite as guest

    remote_url = "http://www.gmql.eu/gmql-rest/"
    login_gmql(remote_url)

    ## Run query as string input parameter
    ## NOTE: not very suitable for long queries

    run_query(remote_url, "query_1", "DATASET = SELECT() Example_Dataset1;
        MATERIALIZE DATASET INTO RESULT_DS;", output_gtf = FALSE)

    ## With system.file() this statement defines the path to the folder
    ## "example" of the package "RGMQL", and then it executes the query
    ## written in the text file "query1.txt"

    test_path <- system.file("example", package = "RGMQL")
    test_query <- file.path(test_path, "query1.txt")
    run_query_fromfile(remote_url, test_query, output_gtf = FALSE)

    ## End(Not run)

[Package RGMQL version 1.6.0 Index]