dataInput: Mass spectrometry data input

Description Usage Arguments Value Author(s) See Also Examples

Description

Two ways to input metabolomics or proteomics data from mass spectrometry as SummarizedExperiment:

  1. createSEFromCSV creates SummarizedExperiment object from csv files;

  2. createSEFromMatrix creates SummarizedExperiment object from separate matrices: one for feature data and the other one for colData.

Usage

1
2
3
4
createSEFromCSV(featurePath, colDataPath, rownames1 = 1, rownames2 = 1,
                  header1 = TRUE, header2 = TRUE)

createSEFromMatrix(feature, colData)

Arguments

featurePath

path for feature data.

colDataPath

path for colData.

rownames1

indicator for feature data with row names. If NULL, row numbers are automatically generated.

rownames2

indicator for colData with row names. If NULL, row numbers are automatically generated.

header1

a logical value indicating whether the first row of feature is column names. The default value is TRUE.

header2

a logical value indicating whether the first row of colData is column names. The default value is TRUE. If colData input is a vector, set to False.

feature

a matrix with row being features and column being subjects.

colData

a column type data containing information about the subjects.

Value

An object of SummarizedExperiment class.

Author(s)

Yuntong Li <yuntong.li@uky.edu>, Chi Wang <chi.wang@uky.edu>, Li Chen <lichenuky@uky.edu>

See Also

SDA input requires an object of SummarizedExperiment class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# ---------- csv input -------------
directory1 <- system.file("extdata", package = "SDAMS", mustWork = TRUE)
path1 <- file.path(directory1, "ProstateFeature.csv")
directory2 <- system.file("extdata", package = "SDAMS", mustWork = TRUE)
path2 <- file.path(directory2, "ProstateGroup.csv")

exampleSE <- createSEFromCSV(path1, path2)
exampleSE

# ---------- matrix input -------------
set.seed(100)
featureInfo <- matrix(runif(800, -2, 5), ncol = 40)
featureInfo[featureInfo<0] <- 0
rownames(featureInfo) <- paste("feature", 1:20, sep = '')
colnames(featureInfo) <- paste('subject', 1:40, sep = '')
groupInfo <- data.frame(grouping=matrix(sample(0:1, 40, replace = TRUE),
                        ncol = 1))
rownames(groupInfo) <- colnames(featureInfo)

exampleSE <- createSEFromMatrix(feature = featureInfo, colData = groupInfo)
exampleSE

SDAMS documentation built on Nov. 8, 2020, 6:10 p.m.