sample_metadata_from_filenames: extract metadata from sample names using regular expressions

View source: R/sample_metadata.R

sample_metadata_from_filenamesR Documentation

extract metadata from sample names using regular expressions

Description

note; user-facing function is sample_metadata_custom()

Usage

sample_metadata_from_filenames(
  sample_id,
  sample_property_regex = list(),
  sample_exclude_regex = "",
  group_order = NA,
  group_regex_array = NA
)

Arguments

sample_id

character array representing sample IDs

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


ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.