R/pca2go.R
limmaquickpca2go.Rd
Extracts the genes with the highest loadings for each principal component, and
performs functional enrichment analysis on them using the simple and quick routine
provided by the limma
package
limmaquickpca2go(
se,
pca_ngenes = 10000,
inputType = "ENSEMBL",
organism = "Mm",
loadings_ngenes = 500,
background_genes = NULL,
scale = FALSE,
...
)
A DESeqTransform()
object, with data in assay(se)
,
produced for example by either rlog()
or
varianceStabilizingTransformation()
Number of genes to use for the PCA
Input format type of the gene identifiers. Deafults to ENSEMBL
, that then will
be converted to ENTREZ ids. Can assume values such as ENTREZID
,GENENAME
or SYMBOL
,
like it is normally used with the select
function of AnnotationDbi
Character abbreviation for the species, using org.XX.eg.db
for annotation
Number of genes to extract the loadings (in each direction)
Which genes to consider as background.
Logical, defaults to FALSE, scale values for the PCA
Further parameters to be passed to the goana 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
library("airway")
library("DESeq2")
library("limma")
#>
#> Attaching package: ‘limma’
#> The following object is masked from ‘package:DESeq2’:
#>
#> plotMA
#> The following object is masked from ‘package:BiocGenerics’:
#>
#> plotMA
data("airway", package = "airway")
airway
#> class: RangedSummarizedExperiment
#> dim: 63677 8
#> metadata(1): ''
#> assays(1): counts
#> rownames(63677): ENSG00000000003 ENSG00000000005 ... ENSG00000273492
#> ENSG00000273493
#> rowData names(10): gene_id gene_name ... seq_coord_system symbol
#> colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
#> colData names(9): SampleName cell ... Sample BioSample
dds_airway <- DESeqDataSet(airway, design = ~ cell + dex)
if (FALSE) { # \dontrun{
rld_airway <- rlogTransformation(dds_airway)
goquick_airway <- limmaquickpca2go(rld_airway,
pca_ngenes = 10000,
inputType = "ENSEMBL",
organism = "Hs")
} # }