optionsTable: Extract Facts from an Options Table

Description Usage Arguments Details Value Author(s) See Also

Description

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

Usage

1
2
3
4
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 Dec. 7, 2018, 8:02 a.m.