normalization: Accessors for the 'normalization' slot.

Description Usage Arguments Examples

Description

This slot stores the name of normalization method which is used while normalizing the count data such as "deseq", "tmm" or "none"

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
normalization(object)

normalization(object) <- value

## S4 method for signature 'MLSeq'
normalization(object)

## S4 method for signature 'MLSeqModelInfo'
normalization(object)

## S4 replacement method for signature 'MLSeq,character'
normalization(object) <- value

Arguments

object

an MLSeq or MLSeqModelInfo object.

value

a character string. One of the available normalization methods for voom-based classifiers.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 
library(DESeq2)
data(cervical)

# a subset of cervical data with first 150 features.
data <- cervical[c(1:150), ]

# defining sample classes.
class <- data.frame(condition = factor(rep(c("N","T"), c(29, 29))))

n <- ncol(data)  # number of samples
p <- nrow(data)  # number of features

# number of samples for test set (30% test, 70% train).
nTest <- ceiling(n*0.3)
ind <- sample(n, nTest, FALSE)

# train set
data.train <- data[ ,-ind]
data.train <- as.matrix(data.train + 1)
classtr <- data.frame(condition = class[-ind, ])

# train set in S4 class
data.trainS4 <- DESeqDataSetFromMatrix(countData = data.train,
                   colData = classtr, formula(~ 1))

## Number of repeats (repeats) might change model accuracies ##
# Classification and Regression Tree (CART) Classification
cart <- classify(data = data.trainS4, method = "rpart",
          ref = "T", preProcessing = "deseq-vst",
          control = trainControl(method = "repeatedcv", number = 5,
                                 repeats = 3, classProbs = TRUE))

normalization(cart)

## End(Not run)

MLSeq documentation built on Nov. 8, 2020, 5:37 p.m.