dispatch_regex_search | R Documentation |
Given the metadata, a couple of regular expressions, and a filename specification, this should be able to pull out the interesting number(s) from one logfile per sample from the metadata.
dispatch_regex_search(
meta,
search,
replace,
input_file_spec,
species = "*",
basedir = "preprocessing",
extraction = "\\1",
which = "first",
as = NULL,
verbose = FALSE,
type = "genome",
...
)
meta |
Input metadata. |
search |
regex used to go hunting for the line of interest. |
replace |
probably the same regex with parentheses in place for gsub(). |
input_file_spec |
filename extractor expression. |
species |
Specify a species or glob it. |
basedir |
Root directory containing the files/logs of metadata. |
extraction |
the replacement portion of gsub(). I am thinking to make it possible to have this function return more interesting outputs if this changes, but for the moment I am sort of assuming \1 will always suffice. |
which |
Usually 'first', which means grab the first match and get out. |
as |
Coerce the output to a specific data type (numeric/character/etc). |
verbose |
For testing regexes. |
type |
Make explicit the type of data (genome/rRNA/Tx/etc). |
... |
Used to pass extra variables to glue for finding files. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.