Description Usage Arguments Value Examples
Wrapper to GMQL PROJECT operator
It creates, from an existing dataset, a new dataset with all the samples from input dataset, but keeping for each sample in the input dataset only those metadata and/or region attributes specified. Region coordinates and values of the remaining metadata and/or region attributes remain equal to those in the input dataset. It allows to:
Remove existing metadata and/or region attributes from a dataset
Update or set new metadata and/or region attributes in the result
1 2 3 4 |
.data |
GMQLDataset class object |
metadata |
vector of strings made up by metadata attributes |
metadata_update |
list of updating rules in the form of key = value generating new metadata attributes and/or attribute values. The following options are available:
|
all_but_meta |
logical value indicating which metadata you want to exclude; If FALSE, only the metadata attributes specified in metadata argument are kept in the output of the operation; if TRUE, the metadata are all kept except those in metadata argument. If metadata input parameter is not defined all_but_meta is not considerd. |
regions |
vector of strings made up by region attributes |
regions_update |
list of updating rules in the form of key = value generating new genomic region attributes and/or values. The following options are available:
|
all_but_reg |
logical value indicating which region attributes you want to exclude; if FALSE, only the regions attributes specified in regions argumentare kept in the output of the operation; if TRUE, the regions attributes are all kept except those in regions argument. If regions is not defined, all_but_reg is not considerd. |
GMQLDataset object. It contains the value to use as input for the subsequent GMQLDataset method
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## 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 folder as a GMQL dataset
## named "data"
init_gmql()
test_path <- system.file("example", "DATASET", package = "RGMQL")
data = read_gmql(test_path)
## This statement creates a new dataset called CTCF_NORM_SCORE by preserving
## all region attributes apart from score, and creating a new region
## attribute called new_score by dividing the existing score value of each
## region by 1000.0 and incrementing it by 100.
## It also generates, for each sample of the new dataset,
## a new metadata attribute called normalized with value 1,
## which can be used in future selections.
CTCF_NORM_SCORE = select(data, metadata_update = list(normalized = 1),
regions_update = list(new_score = (score / 1000.0) + 100),
regions = c("score"), all_but_reg = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.