get_group {MetProc}R Documentation

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 the column is from a biological sample or pooled plasma sample. For example, all pooled plasma samples may have columns identified by the prefix “PPP” and all biological samples may have columns identified by the prefix “X”. Missing data must be coded as NA. Columns must be ordered by injection order.

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:

pp

A vector with column indices of pooled plasma

sid

A vector with column indices of samples

See Also

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

Examples

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') 

[Package MetProc version 1.0.1 Index]