combineDysreg: Combine the dysregulations that are robustly associated with...

Description Usage Arguments Details Value See Also Examples

View source: R/DysReg_2.2.3.R

Description

Screen the dysregulations that are robustly associated with a specific phenotype by using genetic algorithm and combine the dysregulations for constructing signature.

Usage

1
2
3
combineDysreg(dysreg, exp.data,pheno.data, fitness.func, 
              pop.size = 1000, select.rate=0.2, add.rate=0.1, mut.rate = 0.1, 
              topN, train.rate = 0.6, iter=100, verbose = TRUE)

Arguments

dysreg

The dysregulations output from DysReg.

exp.data

Expression matrix. Columns correspond to genes, rows correspond to experiments. The matrix is expected to be already normalized.

pheno.data

The phenotype data corresponding to fitness.func.

fitness.func

The function for calculating fitness in genetic algorithm.

pop.size

The size of random populaiton generated in genetic algorithm.

select.rate

The rate of selcting individual with good fitness from population.

add.rate

The rate for adding individuals with not good fitness from population.

mut.rate

The rate of mutation in genetic algorithm.

topN

The top N individuals with best fitness output in each iteration.

train.rate

The rate of sample for training model in cross-validation.

iter

The times of iteration.

verbose

A logical value indicating whether display the computing progress.

Details

DysRegSig offers two fitness functions for CombineDysreg, fitness.AUC for binary cancer pehnotypes, fitness.Cindex for survival pehnotypes. Users could also build their own fitness functions and conduct to function CombineDysreg.

Value

The results of genetic algorithm:

individ

The top N individuals with best fitness output in each iteration, from which useers could get the best combination of dysregulaitons and use it to build prdictive signatures.

best.fitness

The fitness value for top N individuals.

See Also

fitness.AUC; fitness.Cindex

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
data(ExpData)
data(tf2tar)
data(ClinData)

group.1 <- ClinData$sample[which(ClinData$binaryResponse == 'CR/PR')]
exp.1 <- ExpData[,colnames(ExpData) %in% group.1]

group.2 <- ClinData$sample[which(ClinData$binaryResponse == 'SD/PD')]
exp.2 <- ExpData[,colnames(ExpData) %in% group.2]

dysreg.out <- DysReg(exp.1 = exp.1, exp.2 = exp.2, tf2tar, 
                     de.genes = NULL, de.pval = 0.05, 
                     grn.method = 'Boruta', 
                     pValue = 0.01, ci = 0.90, verbose = T)
                     
dysreg.res <- dysreg.out$dysreg
dysreg.rank <- RankDysReg(dysreg = dysreg.res)
dysreg <- dysreg.rank[1:100,1:2]

pheno.data <- ClinData[,c("sample", "binaryResponse")]
pheno.data <- pheno.data[!is.na(pheno.data$binaryResponse),]
colnames(pheno.data)[2] <- "clin.factor"
head(pheno.data)

## use genetic algorithm to search the best combination of dysregulations
combdysreg.out <- combineDysreg(dysreg = dysreg, exp.data = ExpData,
                                fitness.func = 'fitness.AUC', 
                                pheno.data = pheno.data, 
                                pop.size = 1000, select.rate=0.2, 
                                mut.rate=0.1, add.rate=0.1, 
                                topN = 10, train.rate = 0.6, iter = 100)

## Check the output of combineDysreg
best.fit <- combdysreg.out$best.fitness
best.individ <- combdysreg.out$individ
head(best.fit)

## THe example for building signature from output of combineDysreg

# calculate the frequence of each each dysregualtion among the top N best individuals
freq.res <- vector()
for(i in 1:100){
  start <- 10*i-9
  end <- 10*i
  iter.i <- best.individ[start:end,]
  iter.i <- colSums(iter.i)/10
  freq.res <- rbind(freq.res,iter.i)
}

freq.res <- t(freq.res)
colnames(freq.res) <- c(1:100)
rownames(freq.res) <- paste(dysreg$TF,dysreg$Target,sep = '-')

# visualize the frequence of each each dysregualtion among the top N best individuals
pheatmap(freq.res,color = colorRampPalette(c('lightyellow',"orange", "firebrick3"))(1000), 
         display_numbers = F, cluster_rows = F,cluster_cols = F,
         fontsize_row = 8, fontsize_col = 10)
         
# choose the dysregulations frequently emerged among the top N best individuals as signatures
marker.signatures <- rownames(freq.res)[freq.res[,100] >= 0.9]

SCBIT-YYLab/DysRegSig documentation built on July 19, 2021, 4:38 a.m.