Skip to contents

Given a directory of characterized samples, attempts to determine which peaks may be standards or contaminants that should be removed after assignment.

Usage

indicate_standards_contaminents(
  zip_dir,
  file_pattern = ".zip",
  blank_pattern = "^blank",
  save_dir = NULL,
  conversion_factor = 400,
  progress = TRUE
)

Arguments

zip_dir

which directories to look for files within

file_pattern

what files are we actually using

blank_pattern

regex indicating that a sample may be a blank

save_dir

where to save the files (default is to overwrite originals)

conversion_factor

how much to multiply frequencies by

progress

should progress messages be displayed?

Value

NULL nothing is returned, files are overwritten

Details

For each sample, the scan level frequencies are read in and converted to ranges, and then compared with tiled ranges over the whole frequency range. For those ranges that have 90 to 110% of scan level peaks in ALL blanks, and have 10 to 110% of scan level peaks in at least N-sample - 1, we consider a possible standard or contaminant. The peak is marked so that it can be removed by filtering out it's assignments later.