dispatch_metadata_extract: This is basically just a switch and set of regexes for...

View source: R/metadata.R

dispatch_metadata_extractR Documentation

This is basically just a switch and set of regexes for finding the numbers of interest in the various log files.

Description

When I initially wrote this, it made sense to me to have it separate from the top-level function. I am not sure that is true now, having slept on it.

Usage

dispatch_metadata_extract(
  meta,
  entry_type,
  input_file_spec,
  specification,
  basedir = "preprocessing",
  verbose = FALSE,
  species = "*",
  type = "genome",
  ...
)

Arguments

meta

Starting metadata

entry_type

String which defines the type of log entry to hunt down. If the specification does not include a column, this will be used as the column name to write to the metadata.

input_file_spec

Glue specification defining the log file for each sample to hunt down.

specification

This is the reason I am thinking having this as a separate function might be stupid. I added it to make it easier to calculate ratios of column_x/column_y; but it is a def-facto argument to either get rid of input_file_spec as an arg or to just get rid of this function.

basedir

Root directory containing the files/logs of metadata.

verbose

used for testing regexes.

species

Choose a specific species for which to search (for filenames generally).

type

Set the type of file to search.

...

passed to glue to add more variables to the file spec.

Value

Vector of entries which will be used to populate the new column in the metadata.


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.