createAutotuner {Autotuner} | R Documentation |
This function will create a Autotuner used to extract ms2s.
createAutotuner(data_paths, runfile, file_col, factorCol)
data_paths |
A string path pointing at data files to load in Autotuner. |
runfile |
A data.frame of sample metadata. |
file_col |
Character string of the column name of the column within the runfile that contains sample names. |
factorCol |
Character string of the column name of the column within the runfile that contains sample type factor. |
This function returns an Autotuner object
library(mtbls2) rawPaths <- c( system.file("mzData/MSpos-Ex2-cyp79-48h-Ag-1_1-B,3_01_9828.mzData", package = "mtbls2"), system.file("mzData/MSpos-Ex2-cyp79-48h-Ag-2_1-B,4_01_9830.mzData", package = "mtbls2"), system.file("mzData/MSpos-Ex2-cyp79-48h-Ag-4_1-B,4_01_9834.mzData", package = "mtbls2")) metadata <- read.table(system.file( "a_mtbl2_metabolite_profiling_mass_spectrometry.txt", package = "mtbls2"), header = TRUE, stringsAsFactors = FALSE) metadata <- metadata[sub("mzData/", "", metadata$Raw.Spectral.Data.File) %in% basename(rawPaths),] Autotuner <- Autotuner::createAutotuner(rawPaths, metadata, file_col = "Raw.Spectral.Data.File", factorCol = "Factor.Value.genotype.")