These functions help in searching for specific files in the user's space.
fetch_pipes()
: Fetches pipelines in the following places, in this specific order:
user's folder: ~/flowr/pipelines
current wd: ./
NOTE: If same pipeline is available in multiple places; intuitively, one from the later folder would be selected. As such, giving priority to user's home, and current working directories.
<br>
fetch_conf()
: Fetches configuration files in ALL of the following places:
package: conf
folders in flowr and ngsflows packages.
user's folder: ~/flowr/conf
folder.
current wd: ./
NOTE: This function would greedily return all matching conf files. One would load all of them in the order returned by this function. If the same variable is repeated in multiple files, value from later files would replace those formerly defined. Thus ( as explained above ), giving priority to options defined in user's home and current working directories.
By default flowr loads, flowr.conf
and ngsflows.conf
.
See the details sections, for more explanation on this.
fetch(x, places, urls, verbose = opts_flow$get("verbose"))fetch_pipes(
x,
places,
last_only = FALSE,
urls = opts_flow$get("flowr_pipe_urls"),
silent = FALSE,
verbose = opts_flow$get("verbose"),
ask = TRUE
)
fetch_conf(x = "flowr.conf", places, ...)
name of the file to search for (without extension).
By default fetch_pipes and fetch_conf search for files ending with
.R
and .conf
respectively.
places (paths) to look for files matching the name. Defaults are already defined in the function.
urls to look for, works well for pipelines [not implemented yet]
A numeric value indicating the amount of messages to produce.
Values are integers varying from 0, 1, 2, 3, .... Please refer to the verbose page for more details.
opts_flow$get("verbose")
fetch_pipes():. If multiple pipelines match the pattern, return the last one. [TRUE]
fetch_pipes(): logical, be silent even if no such pipeline is available. [FALSE]
ask before downloading or copying. [not implemented]
[not implemented]
For example flowr has a variable flow_run_path
where it puts all the execution logs etc.
The default value is picked up from the internal flowr.conf file.
To redefine this value, one could create a new file called ~/flowr/conf/flowr.conf and
add a line:
flow_run_path TAB my_awesome_path
, where TAB
is a tab character, since these are tab
separated files.
Also, at any time you can run, opts_flow$load; to load custom options.
# NOT RUN {
## let us find a default conf file
conf = fetch_conf("flowr.conf");conf
## load this
opts_flow$load(conf)
## this returns a list, which prints pretty
pip = fetch_pipes("sleep_pipe")
pip$name
pip$pipe
pip$def
# }
Run the code above in your browser using DataLab