Skip to contents

Load metabolite data from an excel file

Usage

load_excel(
  path,
  data_sheet = NULL,
  feature_sheet = NULL,
  sample_sheet = NULL,
  featureID = "CHEM_ID",
  sampleID = "PARENT_SAMPLE_NAME"
)

Arguments

path

Path to the xls/xlsx file.

data_sheet

A integer of xlsx sheet number for metabolite measurements (peak area data or normalized data, sample [row] * feature [column])

feature_sheet

A integer of xlsx sheet number for metabolite annotation (chemical annotation)

sample_sheet

A integer of xlsx sheet number for sample annotation (sample meta data)

featureID

a character of the metabolite ID column (in feature file and the column names of data file), default: CHEM_ID (provided from Metabolon file)

sampleID

a character of the sample ID column (in sample file and the first column of data file), default: PARENT_SAMPLE_NAME (provided from Metabolon file)

Value

A Metabolite object with slots: assayData, featureData, and sampleData.

Examples


file_path <- system.file("extdata", "QMDiab_metabolomics_OrigScale.xlsx", 
package = "metabolomicsR", mustWork = TRUE)

df_plasma <- load_excel(path = file_path, data_sheet = 1, feature_sheet = 4, sample_sheet = 8, 
sampleID = "QMDiab-ID", featureID = "BIOCHEMICAL")
#> Warning: NAs introduced by coercion
#> Warning: 5 extra features in @assayData: AGE GENDER BMI ETHNICITY T2D ...
#> Warning: 2 extra samples in @assayData: QMDiab95 QMDiab237