goseq | R Documentation |
Note that we do not import things from goseq directly, and only load it if this function is fired. I can't figure out a way to selectively import functions from the goseq package without it having to load its dependencies, which take a long time – and I don't want loading sparrow to take a long time. So, the goseq package has moved to Suggests and then is loaded within this function when necessary.
goseq(
gsd,
selected,
universe,
feature.bias,
method = c("Wallenius", "Sampling", "Hypergeometric"),
repcnt = 2000,
use_genes_without_cat = TRUE,
plot.fit = FALSE,
do.conform = TRUE,
as.dt = FALSE,
.pipelined = FALSE
)
gsd |
The |
selected |
The ids of the selected features |
universe |
The ids of the universe |
feature.bias |
a named vector as long as |
method |
The method to use to calculate the unbiased category enrichment scores |
repcnt |
Number of random samples to be calculated when random sampling
is used. Ignored unless |
use_genes_without_cat |
A boolean to indicate whether genes without a categorie should still be used. For example, a large number of gene may have no GO term annotated. If this option is set to FALSE, those genes will be ignored in the calculation of p-values (default behaviour). If this option is set to TRUE, then these genes will count towards the total number of genes outside the category being tested. |
plot.fit |
parameter to pass to |
do.conform |
By default |
as.dt |
If |
.pipelined |
If this is being called external to a seas pipeline, then
some additional cleanup of columns name output will be done when
|
A data.table
of results, similar to goseq output. The output
from nullp
is added to the outgoing data.table as
an attribue named "pwf"
.
Young, M. D., Wakefield, M. J., Smyth, G. K., Oshlack, A. (2010). Gene ontology analysis for RNA-seq: accounting for selection bias. Genome Biology 11, R14. http://genomebiology.com/2010/11/2/R14
vm <- exampleExpressionSet()
gdb <- conform(exampleGeneSetDb(), vm)
# Identify DGE genes
mg <- seas(vm, gdb, design = vm$design)
lfc <- logFC(mg)
# wire up params
selected <- subset(lfc, significant)$feature_id
universe <- rownames(vm)
mylens <- setNames(vm$genes$size, rownames(vm))
degenes <- setNames(integer(length(universe)), universe)
degenes[selected] <- 1L
gostats <- sparrow::goseq(
gdb, selected, universe, mylens,
method = "Wallenius", use_genes_without_cat = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.