View source: R/cliques_generatecliques.R
generatecliques | R Documentation |
By the way the LINKER method works, some highly-correlated driver genes (TFs) may be dropped from the resultant model, as the role they play at the GRN inference process is very similar. Due to this, we propose a method based on cliques (Fully Connected Networks) to recover those dropped drivers.
generatecliques(
dataset = NULL,
nassay = 1,
method = "pearson",
correlationth = 0.6,
sparsecorrmatrix = TRUE,
numcliques = "All",
mandatorygenes = c(),
selection = 1,
table_cliques = TRUE
)
preparedata(dataset, method, table_cliques, correlationth)
generategraph(correlationth, sparsecorrmatrix, pdoutput)
selectmethod(selection, ggoutput, pdoutput)
plotcliques(ml, pdobject, sortparameter_ix_numcliques, smobject, numcliques)
dataset |
input expression file with genes as rows and samples as columns. |
nassay |
if SummarizedExperiment object is passed as input to dataset, name of the assay containing the desired matrix. Default: 0 |
method |
method to use in the correlation matrix generation (see stats:cor). Default: 'pearson' |
correlationth |
threshold to consider edge exists. Default: 0.6 |
sparsecorrmatrix |
boolean variable specifying whether to set to 0 values below threshold or not. Default: TRUE |
numcliques |
number of cliques to be generated. Default: 'All' |
mandatorygenes |
array of gene names which is mandatory to include in the returned cliques. Default: c() (none) |
selection |
integer selecting method. The available options are: 1 - Maximize Genes/Clique, 2 - Maximize Median Correlation Value/Clique, 3- Maximize Avg Variance Correlation Value/Clique or 4 - Maximize Sum(option two, option three). |
table_cliques |
boolean indicating to return all possible correlated genes instead of groups of cliques. |
pdoutput |
output from preparedata() |
ggoutput |
output from generategraph() |
ml |
cliques from smobject |
pdobject |
output from preparedata() |
sortparameter_ix_numcliques |
parameter for sorting cliques. |
smobject |
output from selectmethod() |
First, preparedata()
prepares the correlation matrix and the hash table
for future uses. Then, generategraph()
generates an igraph object from genes correlation
(threshold dependant) adjacency matrix. After that, selectmethod()
chooses method
in order to remove duplicities generated from the igraph::max_cliques method. Finally,
generatecliques()
generates all the cliques, containing fully connected networks of genes
per clique.
List containing the plot generated and a list with all the generated cliques.
## Suppose we want to recover the drivers LINKER may have dropped out.
## This method allows to group the highly correlated (above `correlationth`)
## driver genes so after the GRN generation, we know that if a particular
## driver gene is taking part of a relationship inside that GRN, all the
## genes inside this group may be also taking part of the same relationship
## due to the high correlation. Note that the large this threshold is, the
## surer we are about this affirmation.
## For this example, we will only work with the driver genes of a example dataset.
dataset <- readRDS(paste0(system.file('extdata',package='TraRe'),
'/tfs_linker_example_eg.rds'))
## Lets select the generated dataset, as the rest of parameters are set by default.
clioutput <- generatecliques(dataset = dataset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.