generateMetadata: generateMetadata

View source: R/generateMetadata.R

generateMetadataR Documentation

generateMetadata

Description

generateMetadata Generate the metadata from the list of raw spectra namely the samples, the experimental factors and the list of selected raw spectra. Depending on whether the sample matrix is supplied as input or not,

Usage

generateMetadata(RAWDIR, procParams, samples = NULL)

Arguments

RAWDIR

The full path of either the raw spectra directory on the disk

procParams

the list of processing parameters. First initialize this list with the Spec1r.Procpar.default list, then modify parameters depending of your spectra set.

samples

the samples matrix with the correspondence of the raw spectra

Value

generateMetadata returns a list containing the following components:

  • samples : the samples matrix with the correspondence of the raw spectra, as well as the levels of the experimental factors if specified in the input.

  • factors : the factors matrix with the corresponding factor names. At minimum, the list contains the Samplecode label corresponding to the samples without their group level.

  • rawids : list of the full directories of the raw spectra (i.e. where the FID files are accessible)

Examples

data_dir <- system.file("extra", package = "Rnmr1D")
samplefile <- file.path(data_dir, "Samples.txt")
samples <- read.table(samplefile, sep="\t", header=TRUE,stringsAsFactors=FALSE)
metadata <- generateMetadata(data_dir, procParams=Spec1rProcpar, samples)


INRA/Rnmr1D documentation built on April 11, 2024, 1:29 a.m.