Description Usage Arguments Value
To convert FT-ICR intensity to compound classes, this function 1) discards masses that are of 0 intensity 2) counts the number of masses for each sample which fall between specified C:H:O ratios which define the following compound classes: (lipids, unsaturated hydrocarbons, proteins, lignins, carbohydrates, amino sugars, tannins, condensed hydrocarbons, total number of masses which fell into those compounds, total number of masses which did not) as well as more basic grouping: (CHO, CHOS, CHOP, CHONS, CHOSP, CHONSP) and average O:C and H:C ratio.
1 2 3 4 5 | countCompoundTypes(fileIn, fileOut = NULL, massHeader = c("Mass", "m.z"),
elementKey = list(C = "C", H = "H", O = "O", N = "N", S = "S", P = "P"),
sampleRegStr = "(X.out)|(^X\\d+$)|(std)|(IntCal_)", maxColReads = 10,
calculateClass = c("averageRatio", "compound", "molecular", "aromaticity"),
verbose = FALSE)
|
fileIn |
A string specifiying the input csv file with header names corresponding to massHeader, and ratioHeaders. |
fileOut |
A string specifying the output csv file. |
massHeader |
A string or array of strings specifying the name of the colum with the mass value (normally first colum). If this is an array then only one of the names should be valid for a given file (ie there can not be two columns named 'Mass' and 'm.z' if the defaults are not changed). |
elementKey |
a list of strings idenfying the counts for the elements. See |
sampleRegStr |
A string that specifies the regular expression used to define sample columns. Note that R will frequently stick an 'X' infront of headers that are strictly digits. |
maxColReads |
A integer specifying the maximum number of columns to be read in at one time. |
calculateClass |
an array of strings identifying the types of counts to compile. Currently 'avergeRatio' [ex: OtoC_weightedMean], compound' [ex: Lipid], 'molecular' [ex: CNO], and 'aromaticity' [ex: Aliphatics] are valid options. |
verbose |
A boolean flag to print out useful flags during processing. |
a data.frame with the count table (this is also saved as a csv to the specified output file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.