% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/web-services.R
\title{Run a GMQL query}
run_query(url, queryName, query, output_gtf = TRUE)

run_query_fromfile(url, filePath, output_gtf = TRUE)
\item{url}{string url of server: It must contain the server address 
and base url; service name is added automatically}

\item{queryName}{string name of the GMQL query file}

\item{query}{string text of the GMQL query}

\item{output_gtf}{logical value indicating file format used for 
storing samples generated by the query.
The possiblities are: 

\item{filePath}{string path of a txt file containing a GMQL query}
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
If error occurs, a specific error is printed


## Login to GMQL REST services suite as guest

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

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

run_query(remote_url, "query_1", "DATASET = SELECT() Example_Dataset1;

## 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)