man/read-function.Rd
94a33e57
 % Generated by roxygen2: do not edit by hand
48ab60c3
 % Please edit documentation in R/gmql_read.R
18697071
 \name{read_gmql}
 \alias{read_gmql}
4bc0d16e
 \alias{read_GRangesList}
5b358a31
 \title{Function read}
94a33e57
 \usage{
4ad24353
 read_gmql(dataset, parser = "CustomParser", is_local = TRUE, is_GMQL = TRUE)
65260a4d
 
4bc0d16e
 read_GRangesList(samples)
94a33e57
 }
 \arguments{
83eb0624
 \item{dataset}{folder path for GMQL dataset or dataset name on repository}
94a33e57
 
18697071
 \item{parser}{string used to parsing dataset files.
 The Parsers available are:
94a33e57
 \itemize{
18697071
 \item{BedParser}
 \item{BroadPeakParser}
94a33e57
 \item{NarrowPeakParser}
18697071
 \item{CustomParser}
94a33e57
 }
 Default is CustomParser.}
 
 \item{is_local}{logical value indicating local or remote dataset}
 
83eb0624
 \item{is_GMQL}{logical value indicating GMQL dataset or not}
65260a4d
 
83eb0624
 \item{samples}{GRangesList}
94a33e57
 }
 \value{
5b358a31
 GMQLDataset object. It contains the value to use as input 
 for the subsequent GMQLDataset method
94a33e57
 }
 \description{
18697071
 It reads a GMQL dataset, as a folder containing some homogenus samples on 
 disk or as a GRangesList, saving it in Scala memory in a way that can be 
83eb0624
 referenced in R. It is also used to read a repository dataset in case of
 remote processing.
94a33e57
 }
 \details{
18697071
 Normally, a GMQL dataset contains an XML schema file that contains
4ad24353
 name of region attributes. (e.g chr, start, stop, strand)"
83eb0624
 The CustomParser reads this XML schema; 
 if you already know what kind of schema your files have, use one of the 
 parsers defined, without reading any XML schema.
5b358a31
 
83eb0624
 If GRangesList has no metadata: i.e. metadata() is empty, two metadata are
18697071
 generated:
5b358a31
 \itemize{
83eb0624
 \item{"provider" = "PoliMi"}
 \item{"application" = "RGMQL"}
5b358a31
 }
94a33e57
 }
 \examples{
 
18697071
 ## This statement initializes and runs the GMQL server for local execution 
83eb0624
 ## and creation of results on disk. Then, with system.file() it defines 
18697071
 ## the path to the folder "DATASET" in the subdirectory "example" 
83eb0624
 ## of the package "RGMQL" and opens such folder as a GMQL dataset 
dda0cfa0
 ## named "data" using CustomParser
83eb0624
 
94a33e57
 init_gmql()
 test_path <- system.file("example", "DATASET", package = "RGMQL")
18697071
 data = read_gmql(test_path)
94a33e57
 
83eb0624
 ## This statement opens such folder as a GMQL dataset named "data" using 
 ## "NarrowPeakParser" 
18697071
 dataPeak = read_gmql(test_path,"NarrowPeakParser")
94a33e57
 
83eb0624
 ## This statement reads a remote public dataset stored into GMQL system 
 ## repository. For a public dataset in a (remote) GMQL repository the 
 ## prefix "public." is needed before dataset name
94a33e57
 
9089a38d
 remote_url = "http://www.gmql.eu/gmql-rest/"
4bc0d16e
 login_gmql(remote_url)
18697071
 data1 = read_gmql("public.Example_Dataset_1", is_local = FALSE)
94a33e57
 
 }