e5131ba8 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gmql_merge.R
\name{aggregate}
\alias{aggregate}
\alias{aggregate,GMQLDataset-method}
|
4ad24353 |
\alias{aggregate-method}
|
e5131ba8 |
\title{Method aggregate}
\usage{
|
4bc0d16e |
\S4method{aggregate}{GMQLDataset}(x, groupBy = conds())
|
e5131ba8 |
}
\arguments{
\item{x}{GMQLDataset class object}
|
f345b6e2 |
\item{groupBy}{\code{\link{condition_evaluation}} function to support
methods with groupBy or JoinBy input paramter}
|
e5131ba8 |
}
\value{
GMQLDataset object. It contains the value to use as input
for the subsequent GMQLDataset method
}
\description{
Wrapper to GMQL MERGE operator
It builds a dataset consisting of a single sample having as
many regions as the number of regions of all the input dataset samples
and as many metadata as the union of the 'attribute-value' tuples of the
|
18697071 |
input samples. If \emph{groupBy} is specified, the samples are then
|
e5131ba8 |
partitioned in groups, each with a distinct value of the grouping metadata
attributes. The operation is separately applied to each group, yielding
one sample in the result for each group. Samples whose metadata are
not present in the grouping metadata parameter are disregarded.
}
\examples{
## This statement initializes and runs the GMQL server for local execution
## and creation of results on disk. Then, with system.file() it defines
## the path to the folder "DATASET" in the subdirectory "example"
## of the package "RGMQL" and opens such file as a GMQL dataset named "exp"
|
dda0cfa0 |
## using CustomParser
|
e5131ba8 |
init_gmql()
|
18697071 |
test_path <- system.file("example", "DATASET", package = "RGMQL")
exp = read_gmql(test_path)
|
e5131ba8 |
## This statement creates a dataset called merged which contains one
## sample for each antibody_target and cell value found within the metadata
## of the exp dataset sample; each created sample contains all regions
## from all 'exp' samples with a specific value for their
|
18697071 |
## antibody_target and cell metadata attributes.
|
e5131ba8 |
|
18697071 |
merged = aggregate(exp, conds(c("antibody_target", "cell")))
|
e5131ba8 |
}
|