centrality_gsea: Gene Set Enrichment Analysis with centrality measure

Description Usage Arguments Value Author(s) See Also Examples

View source: R/centrality_gsea.R

Description

GSEA is performed with centrality measure

Usage

1
2
3
4
centrality_gsea(geneset, x, adjacency, pseudo = 1, nperm = 1000,
                centrality = function(x) rowSums(abs(x)),
                weightParam = 1, minSize = 1, maxSize = Inf,
                gseaParam = 1, nproc = 0, BPPARAM = NULL)

Arguments

geneset

list of gene sets

x

Named vector of gene-level statistics. Names should be the same as in gene sets.

adjacency

adjacency matrix

pseudo

pseudo number for log2 transformation (default: 1)

nperm

number of permutations (default: 1000)

centrality

centrality measure, degree centrality or node strength is default

weightParam

weight parameter value for the centrality measure, equally weight if weightParam = 0 (default: 1)

minSize

minimal size of a gene set (default: 1)

maxSize

maximal size of a gene set (default: Inf)

gseaParam

GSEA parameter value (default: 1)

nproc

see fgsea::fgsea

BPPARAM

see fgsea::fgsea

Value

GSEA result

Author(s)

Dongmin Jung

See Also

fgsea::fgsea

Examples

1
2
3
4
5
6
7
data(examplePathways)
data(exampleRanks)
exampleRanks <- exampleRanks[1:100]
adjacency <- diag(length(exampleRanks))
rownames(adjacency) <- names(exampleRanks)
set.seed(1)
result.GSEA <- centrality_gsea(examplePathways, exampleRanks, adjacency)

Example output

Loading required package: fgsea
Loading required package: PPInfer
Loading required package: biomaRt
Loading required package: kernlab
Loading required package: ggplot2

Attaching package:ggplot2The following object is masked frompackage:kernlab:

    alpha

Loading required package: igraph

Attaching package:igraphThe following objects are masked frompackage:stats:

    decompose, spectrum

The following object is masked frompackage:base:

    union

Loading required package: STRINGdb
Loading required package: yeastExpData
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:igraph:

    normalize, path, union

The following object is masked frompackage:kernlab:

    type

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min


Attaching package:graphThe following objects are masked frompackage:igraph:

    degree, edges, intersection

sh: 1: wc: Permission denied
Warning message:
In fgsea(geneset, statistic, nperm = nperm, minSize = minSize, maxSize = maxSize,  :
  You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.

gsean documentation built on Nov. 8, 2020, 6:36 p.m.