# NOT RUN {
## Use this link for a few elaborate examples:
## http://flow-r.github.io/flowr/flowr/tutorial.html#define_modules
ex = file.path(system.file(package = "flowr"), "pipelines")
flowmat = as.flowmat(file.path(ex, "sleep_pipe.tsv"))
flowdef = as.flowdef(file.path(ex, "sleep_pipe.def"))
fobj = to_flow(x = flowmat, def = flowdef, flowname = "sleep_pipe", platform = "lsf")
## create a vector of shell commands
cmds = c("sleep 1", "sleep 2")
## create a named list
lst = list("sleep" = cmds)
## create a flowmat
flowmat = to_flowmat(lst, samplename = "samp")
## Use flowmat to create a skeleton flowdef
flowdef = to_flowdef(flowmat)
## use both (flowmat and flowdef) to create a flow
fobj = to_flow(flowmat, flowdef)
## submit the flow to the cluster (execute=TRUE) or do a dry-run (execute=FALSE)
# }
# NOT RUN {
fobj2 = submit_flow(fobj, execute=FALSE)
fobj3 = submit_flow(fobj, execute=TRUE)
## Get the status or kill all the jobs
status(fobj3)
kill(fobj3)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab