createAutotuner: createAutotuner

Description Usage Arguments Value Examples

View source: R/Autotuner-class.R

Description

This function will create a Autotuner used to extract ms2s.

Usage

1
createAutotuner(data_paths, runfile, file_col, factorCol)

Arguments

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.

Value

This function returns an Autotuner object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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.")

crmclean/AutoTuner documentation built on Jan. 29, 2021, 4:48 p.m.