optionsTable: Extract Facts from an Options Table

optionsTableR Documentation

Extract Facts from an Options Table

Description

Functions to query an Options Table for values that affect program behaviour

Usage

readOptionsTable(file)

getOptionValue(tbl, arg, notfound = NA, verbose = TRUE, speciesID = NULL)
getOptionTrue(tbl, arg, notfound = NA, verbose = TRUE, speciesID = NULL)

Arguments

file

Name of an options file.

tbl

Either an options table previously read via 'readOptionsTable' or a character string file name to open and read from.

arg

The named option to be found in the table.

notfound

The value to be used if that option is not found in the options table, where NA means the option is required to be in the table.

verbose

Report the details of the search to standard out.

speciesID

A SpeciesID for specifying an option that has different values for different organisms. Treated as a suffix to arg, so if speciesID='MTb' and arg='DE.minimumRPKM', the function will look for an option named 'DE.minimumRPKM.MTb'.

Details

This is the principal means of querying values that affect the general runtime behavior of many Duffy Lab package tools. For settings that are sample specific, see AnnotationTable.

The options table is a text file with tab separated fields. Each row represents one named option, where the first (leftmost) column is the option name and the second column is the value for that option.

Any text in the value column of the options table file can have embedded environment variables, which will be run-time substituted at the time they are 'gotten'.

The truth of a value uses the general heuristic that F, False, N, No, 0, and the empty string "" resolve to FALSE and everything else is TRUE. See as.TRUEorFALSE.

Value

For readOptionsTable a table of option values, with 2 columns OptionName, Value.

For getOptionValue the one entry from the table at: OptionName='arg' as a characer string, or the 'notfound' value.

For getOptionTrue the one entry from the table at: OptionName='arg' as a logical value, or the 'notfound' value.

Author(s)

Bob Morrison

See Also

readAnnotationTable, getAnnotationValue, getAnnotationTrue, for the corresponding functions for querying sample specific values from the Annotation table.


robertdouglasmorrison/DuffyTools documentation built on April 16, 2024, 6:31 a.m.