BI_ROC.lasso: Bulid a binomial lasso model via exprs and design objects

Description Usage Arguments Author(s) Examples

Description

ROC.lasso help bulid a binomial lasso model via exprs and design objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ROC.lasso(expr.matrix,
          design,
          select,
          contrast = "N.status",
          contrast.control = "N0",
          k=10,
          R=100,
          seed = 2018,seed.range = 2500:5000,
          optimize.method = "min",
          show.music = F)

Arguments

expr.matrix

a log scale expression matrix

design

a design object

select

select genes names

contrast

the colnames of the contrast

contrast.control

the control of the contrast

k

nfolds

\itemRthe number of bootstrap

seed

random seed

seed.range

the range of random seeds

optimize.method

one of "min" and "1se".Default is "min"

Author(s)

Weibin Huang<654751191@qq.com>

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
## This is a simulative process and NOT RUN

library(lucky)
load1(c("data.fpkm","design.train"))

## main parameters
expr.matrix = data.fpkm
design = design.train
select = rownames(data.fpkm)[1:50]

## others parameters
contrast = "N.status"
contrast.control = "N0"
k=10
R=100
seed = 2018
seed.range = 2500:5000
each.size = 15
optimize.method = "min"
show.music = T

## ROC.lasso
l1 <- ROC.lasso(expr.matrix,
                design,
                select,
                contrast = "N.status",
                contrast.control = "N0",
                k=10,
                R=100,
                seed = 2018,seed.range = 2500:5000,
                optimize.method = "min",
                show.music = F)

## look at the models
View(uniqueModel(l1$modeldata))

## select a model in position 1
model <- result.lassoModel(l1,
                           position = 1,
                           names = "ROC",
                           dig = 5)
View(model[[1]])

## get model matrix for ROC building
x <- getModelMatrix(expr.matrix = data.fpkm,
                    design = design.train,
                    model = model)
View(x$metadata)

## ROC building
roc1 <- compareROC2(data = x$metadata,
                    markers = c(x$modelgenes,"score"),
                    status = "N.status",
                    merge.markers=list(merge = x$modelgenes),
                    roc.type = "ggplot",
                    title="ROC Curves",
                    color=NULL,
                    half.border = F,reference = T,
                    legend.position=c(0.8,0.2),
                    show.auc = T,auc.digits = 2,
                    width = "love")

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.