% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3Distal.R
\name{DISTAL-Object}
\alias{DISTAL-Object}
\alias{DL}
\alias{DG}
\alias{DLE}
\alias{DGE}
\alias{MD}
\alias{UP}
\alias{DOWN}
\title{DISTAL object class constructor}
\usage{
DL(value)

DG(value)

DLE(value)

DGE(value)

MD(value)

UP()

DOWN()
}
\arguments{
\item{value}{string identifying distance between genomic regions
in base pair}
}
\value{
Distal object
}
\description{
This class constructor is used to create instances of DISTAL object
to be used in GMQL JOIN operations (RGMQL merge functions) that use
genometric predicate parameter requiring distal condition on value
}
\details{
\itemize{
\item{DL: It denotes the less distance clause,
which selects all the regions of a joined experiment dataset sample such
that their distance from the anchor region of the joined reference dataset
sample is less than 'value' bases.}
\item{DLE: It denotes the less equal distance clause,
which selects all the regions of a joined experiment dataset sample such
that their distance from the anchor region of the joined reference dataset
sample is less than, or equal to, 'value' bases.}
\item{DG: It denotes the great distance clause,
which selects all the regions of a joined experiment dataset sample such
that their distance from the anchor region of the joined reference dataset
sample is greater than 'value' bases. }
\item{DGE: It denotes the great equal distance clause,
which selects all the regions of a joined experiment dataset sample such
that their distance from the anchor region of the joined reference dataset
sample is greater than, or equal to, 'value' bases.}
\item{MD: It denotes the minimum distance clause, which selects
the first 'value' regions of the joined experiment at minimial distance
from the anchor region of the joined reference dataset sample.}
\item{UP: It denotes the upstream direction of the genome.
It makes predicates to be hold on the upstream of the regions of the joined
reference dataset sample.
UP is true when region of the joined experiment dataset sample is in the
upstream genome of the anchor region of the joined reference dataset sample.
When this clause is not present, distal conditions apply to both
directions of the genome.}
\item{DOWN:  It denotes the downstream direction of the genome.
It makes predicates to be hold on the downstream of the regions of the
joined reference dataset sample.
DOWN is true when region of the joined experiment dataset sample is in the
downstream genome of the anchor region of the joined reference dataset
sample. When this clause is not present, distal conditions apply to both
directions of the genome.}
}
}
\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 folders "DATASET" and "DATASET_GDM" in the subdirectory
## "example" of the package "RGMQL", and opens such folders as a GMQL
## datasets named "TSS" and "HM", respectively, using CustomParser

init_gmql()
test_path <- system.file("example", "DATASET", package = "RGMQL")
test_path2 <- system.file("example", "DATASET_GDM", package = "RGMQL")

## Given a dataset HM and one called TSS with a sample including
## Transcription Start Site annotations, this statement  searches for those
## regions of HM that are at a minimal distance from a transcription
## start site (TSS) and takes the first/closest one for each TSS, provided
## that such distance is lesser than 1200 bases and joined TSS and HM
## samples are obtained from the same provider (joinby clause).

join_data = merge(TSS, HM,
genometric_predicate = list(MD(1), DL(1200)), conds("provider"),
region_output = "RIGHT")

## Given a dataset HM and one called TSS with a sample including
## Transcription Start Site annotations, this statement searches for those
## regions of HM that are downstream and at a minimal distance from a
## transcription start site (TSS) and takes the first/closest one for each
## TSS, provided that such distance is greater than 12K bases and joined
## TSS and HM samples are obtained from the same provider (joinby clause).

join_data = merge(TSS, HM,
genometric_predicate = list(MD(1), DGE(12000), DOWN()),
conds("provider"), region_output = "RIGHT")

}