Description Usage Arguments Value Examples
View source: R/formatting-functions.R
This function initializes objects that will hold the metabolite data, formats peak intensity data into one of the formats acceptable by MetaboAnalystR, and sets the metabolite data object.
1 2 3 4 5 6 7 8 9 10 | format_MetabolomicData(mSetObj, Peak.list, Sample.df, Sample.data, tbl.id, ...)
## S3 method for class 'pktable'
format_MetabolomicData(mSetObj, Peak.list, Sample.df, Sample.data, tbl.id, ...)
## S3 method for class 'mass_all'
format_MetabolomicData(mSetObj, Peak.list, Sample.df, Sample.data, tbl.id, ...)
## Default S3 method:
format_MetabolomicData(mSetObj, Peak.list, Sample.df, Sample.data, tbl.id, ...)
|
mSetObj |
NULL |
Peak.list |
data frame containing combined ion mode peaklist with ion mode duplicates removed. |
Sample.df |
data frame with class info as columns. Must contain a separate row entry for each unique sex/class combination. Must contain the columns 'Sex','Class','n','Endogenous'. |
Sample.data |
data frame with phenotype data as columns and a row for each study sample. First column must be a unique sample identifier with the header 'CT-ID'. Phenotype columns may vary, but must include two columns called 'Plate Number' and 'Plate Position' for determining run order. |
tbl.id |
character Table name to draw from database. Default is NULL |
... |
Arguments to pass parameters to database functions |
mSetObj
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(LUMA)
if(require(lcmsfishdata, quietly = TRUE)) {
file <- system.file("extdata","Sample_Class.txt", package = "LUMA") # is case sensitive on Linux
Sample.df <- read.table(file, header = TRUE, sep = "\t")
file2 <- system.file("extdata","Sample_Data.csv", package = "LUMA") # is case sensitive on Linux
Sample.data <- read.table(file2, header = TRUE, sep = ",")
Peak.list <- Peaklist_db$Peaklist_Normalized
class(mSetObj) <- "pktable"
new_mSetObj <- format_MetabolomicData(mSetObj = mSetObj, Peak.list =
Peak.list, Sample.df = Sample.df, Sample.data = Sample.data)
new_mSetObj$dataSet$orig.cls
class(mSetObj) <- "mass_all"
new_mSetObj <- format_MetabolomicData(mSetObj = mSetObj, Peak.list =
Peak.list, Sample.df = Sample.df, Sample.data = Sample.data)
new_mSetObj$dataSet$orig.cls
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.