NET_run {TraRe} | R Documentation |
NET_run()
generate a single GRN. NET_compute_graph_all_LASSO1se()
defines
the statistics of drivers and targets to be the Lasso method, choosing 1 standard error from the minimum RSS.
NET_compute_graph_all_LASSOmin()
uses Lasso method, choosing the minimum RSS point. NET_compute_graph_all_LM()
uses a linear model and NET_compute_graph_all_VBSR()
uses a Variational Bayes Spike Regression.
NET_run( lognorm_est_counts, target_filtered_idx, regulator_filtered_idx, nassay = 1, regulator = "regulator", graph_mode = c("VBSR", "LASSOmin", "LASSO1se", "LM"), FDR = 0.05, NrCores = 1 ) NET_compute_graph_all_LASSO1se( lognorm_est_counts, regulator_filtered_idx, target_filtered_idx, alpha = 1 - 1e-06, NrCores = 1 ) NET_compute_graph_all_LASSOmin( lognorm_est_counts, regulator_filtered_idx, target_filtered_idx, alpha = 1 - 1e-06, NrCores = 1 ) NET_compute_graph_all_LM( lognorm_est_counts, regulator_filtered_idx, target_filtered_idx, NrCores = 1 ) NET_compute_graph_all_VBSR( lognorm_est_counts, regulator_filtered_idx, target_filtered_idx, NrCores = 1 )
lognorm_est_counts |
Matrix of log-normalized estimated counts of the gene expression data (Nr Genes x Nr samples) |
target_filtered_idx |
Index array of the target genes on the lognorm_est_counts matrix if SummarizedExperiment object is not provided. |
regulator_filtered_idx |
Index array of the regulatory genes on the lognorm_est_counts matrix if SummarizedExperiment object is not provided. |
nassay |
if SummarizedExperiment object is passed as input to lognorm_est_counts, name of the assay containing the desired matrix. Default: 1 (first item in assay's list). |
regulator |
if SummarizedExperiment object is passed as input to lognorm_est_counts, name of the rowData() variable to build target_filtered_idx and regulator_filtered_idx. This variable must be one for driver genes and zero for target genes. Default: 'regulator' |
graph_mode |
Chosen method(s) to generate the edges in the bipartite graph. The available options are 'VBSR', 'LASSOmin', 'LASSO1se' and 'LM'. By default, all methods are chosen. |
FDR |
The False Discovery Rate correction used for the enrichment analysis. By default, 0.05. |
NrCores |
Nr of computer cores for the parallel parts of the method. Note that the parallelization is NOT initialized in any of the functions. By default, 3. |
alpha |
feature selection parameter in case of a LASSO model to be chosen. |
List containing the GRN graphs.
## Assume we have run the rewiring method and we have discovered a rewired module. ## After we have selected the drivers and targets from that modules, we can build ## a single GRN to study it separately. ## For this example, we are going to join 60 drivers and ## 200 targets genes from the example folder. drivers <- readRDS(paste0(system.file('extdata',package='TraRe'),'/tfs_linker_example.rds')) targets <- readRDS(paste0(system.file('extdata',package='TraRe'),'/targets_linker_example.rds')) lognorm_est_counts <- as.matrix(rbind(drivers,targets)) ## We create the index for drivers and targets in the log-normalized gene expression matrix. R<-60 T<-200 regulator_filtered_idx <- seq_len(R) target_filtered_idx <- R+c(seq_len(T)) ## We recommend VBSR (rest of parameters are set by default) graph <- NET_run(lognorm_est_counts,target_filtered_idx=target_filtered_idx, regulator_filtered_idx=regulator_filtered_idx,graph_mode='VBSR')