Description Usage Arguments Value Examples
Extracts the genes with the highest loadings for each principal component, and
performs functional enrichment analysis on them using routines and algorithms from
the topGO
package
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
se |
A |
pca_ngenes |
Number of genes to use for the PCA |
annotation |
A |
inputType |
Input format type of the gene identifiers. Will be used by the routines of |
organism |
Character abbreviation for the species, using |
ensToGeneSymbol |
Logical, whether to expect ENSEMBL gene identifiers, to convert to gene symbols
with the |
loadings_ngenes |
Number of genes to extract the loadings (in each direction) |
background_genes |
Which genes to consider as background. |
scale |
Logical, defaults to FALSE, scale values for the PCA |
return_ranked_gene_loadings |
Logical, defaults to FALSE. If TRUE, simply returns a list containing the top ranked genes with hi loadings in each PC and in each direction |
annopkg |
String containing the name of the organism annotation package. Can be used to
override the |
... |
Further parameters to be passed to the topGO routine |
A nested list object containing for each principal component the terms enriched
in each direction. This object is to be thought in combination with the displaying feature
of the main pcaExplorer
function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(airway)
library(DESeq2)
data(airway)
airway
dds_airway <- DESeqDataSet(airway, design= ~ cell + dex)
## Not run:
rld_airway <- rlogTransformation(dds_airway)
# constructing the annotation object
anno_df <- data.frame(gene_id = rownames(dds_airway),
stringsAsFactors = FALSE)
library("AnnotationDbi")
library("org.Hs.eg.db")
anno_df$gene_name <- mapIds(org.Hs.eg.db,
keys = anno_df$gene_id,
column = "SYMBOL",
keytype = "ENSEMBL",
multiVals = "first")
rownames(anno_df) <- anno_df$gene_id
bg_ids <- rownames(dds_airway)[rowSums(counts(dds_airway)) > 0]
library(topGO)
pca2go_airway <- pca2go(rld_airway,
annotation = anno_df,
organism = "Hs",
ensToGeneSymbol = TRUE,
background_genes = bg_ids)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.