getData: getData

View source: R/getData.R

getDataR Documentation

getData

Description

Evaluation of data recipes to generate curated dataset of interest.

Usage

getData(
  rcp,
  outdir,
  prefix = NULL,
  notes = c(),
  conda = FALSE,
  BPPARAM = NULL,
  ...
)

Arguments

rcp

the data recipe in cwlProcess S4 class.

outdir

Character string specifying the directory to store the output files. Will automatically create if not exist or provided.

prefix

Character string specifying the file name of the annotation files (.yml, .cwl, .sh, .md5).

notes

User assigned notes/keywords to annotate the data and be used for keywords matching in dataSearch(keywords = ).

conda

Whether to use conda to install required software when evaluating the data recipe as a CWL workflow. Default is FALSE.

BPPARAM

The options for BiocParallel::bpparam.

...

Arguments to be passed into Rcwl:runCWL().

Value

The data files and 4 meta files: .cwl: The cwl script that was internally run to get the data; .yml: the input parameter values for the data recipe and user specified data annotation notes, versions etc; .sh: The script for data processing; .md: checksum file to verify the integrity of generated data files.

Examples

## Not run: 
library(Rcwl)
outdir <- file.path(tempdir(), "SharedData")

## Example 1
echo_out <- recipeLoad("echo_out")
Rcwl::inputs(echo_out)
echo_out$input <- "Hello World!"
echo_out$outfile <- "outfile"
res <- getData(echo_out,
               outdir = outdir,
               notes = c("echo", "hello", "world", "txt"),
               showLog = TRUE)

# Example 2
ensembl_liftover <- recipeLoad("ensembl_liftover")
Rcwl::inputs(ensembl_liftover)
ensembl_liftover$species <- "human"
ensembl_liftover$from <- "GRCh37"
ensembl_liftover$to <- "GRCh38"

res <- getData(ensembl_liftover,
        outdir = outdir, 
        notes = c("ensembl", "liftover", "human", "GRCh37", "GRCh38"),
        showLog = TRUE)
dir(outdir)

## End(Not run)

rworkflow/ReUseData documentation built on Dec. 7, 2023, 11 p.m.