man/upload_dataset.Rd
94a33e57
 % Generated by roxygen2: do not edit by hand
48ab60c3
 % Please edit documentation in R/web-services.R
94a33e57
 \name{upload_dataset}
 \alias{upload_dataset}
 \title{Upload dataset}
 \usage{
73652f4d
 upload_dataset(url, datasetName, folderPath, schemaName = NULL)
94a33e57
 }
 \arguments{
 \item{url}{string url of server: It must contain the server address 
 and base url; service name is added automatically}
 
83eb0624
 \item{datasetName}{name of dataset to create in repository}
94a33e57
 
83eb0624
 \item{folderPath}{string local path to the folder containing the samples 
 files}
94a33e57
 
83eb0624
 \item{schemaName}{string name of schema used to parse the samples;
94a33e57
 schemaName available are:
 \itemize{
 \item{NARROWPEAK}
 \item{BROADPEAK}
 \item{VCF}
 \item{BED}
 \item{BEDGRAPH}
 }
dda0cfa0
 if schemaName is NULL, it looks for a XML schema file to read in the 
18697071
 folderPath}
94a33e57
 
83eb0624
 \item{isGMQL}{logical value indicating whether it is uploaded a GMQL 
 dataset or not}
94a33e57
 }
 \value{
 None
 }
 \description{
 It uploads a folder (GMQL or not) containing sample files using 
 the proper GMQL web service available on a remote server: 
83eb0624
 a new dataset is created on remote repository
94a33e57
 }
 \details{
83eb0624
 If no error occurs, it prints "Upload Complete", otherwise a specific error 
94a33e57
 is printed
0db4d25e
 
 NOTE: 
 The folder layout must obey the following rules and adopt 
 the following layout:
 The dataset folder can have any name, but must contains the 
 sub-folders named: "files".
 The sub-folder "files" contains the dataset files and 
 the schema xml file.
 The schema files adopt the following the naming conventions:
 
 - "schema.xml"
 - "test.schema"
 
 The names must be in LOWERCASE. Any other schema file 
 will not be conisdered, if both are present, "test.schema" will be used.
94a33e57
 }
 \examples{
 
 \dontrun{
 
83eb0624
 ## This statement defines the path to the folder "DATASET_GDM" in the 
 ## subdirectory "example" of the package "RGMQL"
 
94a33e57
 test_path <- system.file("example", "DATASET_GDM", package = "RGMQL")
83eb0624
 
dda0cfa0
 ## Login to GMQL REST services suite at remote url
83eb0624
 
9089a38d
 remote_url <- "http://www.gmql.eu/gmql-rest/"
94a33e57
 login_gmql(remote_url)
83eb0624
 
dda0cfa0
 ## Upload of GMQL dataset with "dataset1" as name, without specifying any 
83eb0624
 ## schema 
 
94a33e57
 upload_dataset(remote_url, "dataset1", folderPath = test_path)
83eb0624
 
94a33e57
 }
 }