MetProc (version 1.0.1)

get_group: Retrieve Index of Biological Samples and Pooled Plasma Samples

Description

Takes a metabolomics data matrix and retrieves the column indices of biological samples and pooled plasma samples. Columns must be ordered by injection order and each column ID should have a unique prefix designating the particular type of sample it is. For example, PPP' to designate pooled plasma samples and X to designate biological samples. Generally if data is read into R using the read.met function, columns will be labeled appropriately.

Usage

get_group(df, ppkey = "PPP", sidkey = "X")

Arguments

df
The metabolomics dataset, ideally read from the read.met function. Each column represents a sample and each row represents a metabolite. Columns should be labeled with some unique prefix denoting whether t
ppkey
The unique prefix of pooled plasma samples. Default is "PPP".
sidkey
The unique prefix of biological samples. Default is "X".

Value

  • A list of length 2 with the following keys:
  • ppA vector with column indices of pooled plasma
  • sidA vector with column indices of samples

See Also

See MetProc-package for examples of running the full process.

Examples

Run this code
library(MetProc)
#Read metabolomics data
metdata <- read.met(system.file("extdata/sampledata.csv", package="MetProc"),
headrow=3, metidcol=1, fvalue=8, sep=",", ppkey="PPP", ippkey="BPP")

#Get groups based on samples and pooled plasma
grps <- get_group(metdata,'PPP','X')

Run the code above in your browser using DataLab