View source: R/sample_metadata.R
sample_metadata_custom | R Documentation |
For advanced users: import sample metadata directly from the sample names using regular expressions
sample_metadata_custom(
dataset,
sample_property_regex = list(),
sample_exclude_regex = "",
group_order = NA,
group_regex_array = NA
)
dataset |
your dataset |
sample_property_regex |
a named list of regular expressions to extract sample properties. name=sample property, value = array of length two with the regex and the replace string (first 2 arguments of sub()) |
sample_exclude_regex |
optionally, regex to select samples that should be flagged as 'exclude' |
group_order |
optionally, you can provide a preferred ordering of the sample groups as a character array |
group_regex_array |
optionally, a regex that specifically extracts sample groups and leaves non-matches in an 'unassigned' group |
# example of a regex applied to sample names to extract the sample shortname and group
## Not run: sample_property_regex = list(
shortname = c(".*experimentname_([A-Z]+.\\d).*", "\\1"),
group = c(".*experimentname_([A-Z]+)_.*", "\\1")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.