% Generated by roxygen2: do not edit by hand % Please edit documentation in R/web-services.R \name{run_query} \alias{run_query} \alias{run_query} \alias{run_query_fromfile} \title{Run a GMQL query} \usage{ run_query(url, queryName, query, output_gtf = TRUE) run_query_fromfile(url, filePath, output_gtf = TRUE) } \arguments{ \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: \itemize{ \item{GTF} \item{TAB} }} \item{filePath}{string path of a txt file containing a GMQL query} } \value{ None } \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 } \details{ If error occurs, a specific error is printed } \examples{ \dontrun{ ## 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) } }