View source: R/sig_genes_extract.R
sig_genes_extract | R Documentation |
From the layer-level modeling results, this function extracts the top n
significant genes. This is the workhorse function used by
sig_genes_extract_all()
through which we obtain the information that can
then be used by functions such as layer_boxplot()
for constructing
informative titles.
sig_genes_extract(
n = 10,
modeling_results = fetch_data(type = "modeling_results"),
model_type = names(modeling_results)[1],
reverse = FALSE,
sce_layer = fetch_data(type = "sce_layer")
)
n |
The number of the top ranked genes to extract. |
modeling_results |
Defaults to the output of
|
model_type |
A named element of the |
reverse |
A |
sce_layer |
Defaults to the output of
|
A data.frame()
with the top n
significant genes
(as ordered by their statistics in decreasing order) in long format. The
specific columns are described further in the vignette.
Adapted from https://github.com/LieberInstitute/HumanPilot/blob/master/Analysis/Layer_Guesses/layer_specificity_functions.R
Other Layer modeling functions:
layer_boxplot()
,
sig_genes_extract_all()
## Obtain the necessary data
if (!exists("modeling_results")) {
modeling_results <- fetch_data(type = "modeling_results")
}
if (!exists("sce_layer")) sce_layer <- fetch_data(type = "sce_layer")
## anova top 10 genes
sig_genes_extract(
modeling_results = modeling_results,
sce_layer = sce_layer
)
## Extract all genes
sig_genes_extract(
modeling_results = modeling_results,
sce_layer = sce_layer,
n = nrow(sce_layer)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.