save_gnet: Save the GNET2 results

Description Usage Arguments Value Examples

View source: R/plot_utils.R

Description

Save the edge list, group index of each gene and plot the top groups

Usage

1
save_gnet(gnet_result, save_path = ".", num_module = 10, max_gene_num = 100)

Arguments

gnet_result

Results returned by gnet().

save_path

path to save files

num_module

The number of modules with highest score to plot.

max_gene_num

The max number of genes to show in the heatmap.

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)
init_group_num = 5
init_method = 'boosting'
exp_data <- matrix(rnorm(50*10),50,10)
reg_names <- paste0('TF',1:5)
rownames(exp_data) <- c(reg_names,paste0('gene',1:(nrow(exp_data)-length(reg_names))))
colnames(exp_data) <- paste0('condition_',1:ncol(exp_data))
se <- SummarizedExperiment::SummarizedExperiment(assays=list(counts=exp_data))
gnet_result <- gnet(se,reg_names,init_method,init_group_num)
save_gnet(gnet_result)

jianlin-cheng/GNET2 documentation built on Oct. 22, 2020, 11:24 p.m.