Last data update: 2014.03.03

R: Primary dis-regulation: Pathway analysis approach based on...
pDisR Documentation

Primary dis-regulation: Pathway analysis approach based on the unexplained dis-regulation of genes

Description

Primary dis-regulation: Pathway analysis approach based on the unexplained dis-regulation of genes

Usage

pDis(x, graphs, ref = NULL, nboot = 2000, verbose = TRUE,
  cluster = NULL, seed = NULL)

Arguments

x

named vector of log fold changes for the differentially expressed genes; names(x) must use the same id's as ref and the nodes of the graphs

graphs

list of pathway graphs as objects of type graph (e.g., graphNEL); the graphs must be weighted graphs (i.e., have an attribute weight for both nodes and edges)

ref

the reference vector for all genes in the analysis; if the reference is not provided or it is identical to names(x) a cut-off free analysis is performed

nboot

number of bootstrap iterations

verbose

print progress output

cluster

a cluster object created by makeCluster for parallel computations

seed

an integer value passed to set.seed() during the boostrap permutations

Details

See details in the cited articles.

Value

An object of class pDisRes-class.

Author(s)

Calin Voichita, Sahar Ansari and Sorin Draghici

References

Voichita C., Donato M., Draghici S.: "Incorporating gene significance in the impact analysis of signaling pathways", IEEE Machine Learning and Applications (ICMLA), 2012 11th International Conference on, Vol. 1, p.126-131, 2012 Ansari, S., Voichita, C., Donato, M., Tagett, R., & Draghici, S. A Novel Pathway Analysis Approach Based on the Unexplained Disregulation of Genes.

See Also

Summary, keggPathwayGraphs, setNodeWeights, setEdgeWeights

Examples


# load a multiple sclerosis study (public data available in Array Express 
# ID: E-GEOD-21942)
# This file contains the top table, produced by the limma package with 
# added gene information. All the probe sets with no gene associate to them,
# have been removed. Only the most significant probe set for each gene has been
# kept (the table is already ordered by p-value)
# The table contains the expression fold change and signficance of each  
# probe set in peripheral blood mononuclear cells (PBMC) from 12 MS patients
# and 15 controls.
load(system.file("extdata/E-GEOD-21942.topTable.RData", package = "ROntoTools"))
head(top)

# select differentially expressed genes at 1% and save their fold change in a 
# vector fc and their p-values in a vector pv
fc <- top$logFC[top$adj.P.Val <= .01]
names(fc) <- top$entrez[top$adj.P.Val <= .01]

pv <- top$P.Value[top$adj.P.Val <= .01]
names(pv) <- top$entrez[top$adj.P.Val <= .01]

# alternativly use all the genes for the analysis
# NOT RUN: 
# fc <- top$logFC
# names(fc) <- top$entrez

# pv <- top$P.Value
# names(pv) <- top$entrez

# get the reference
ref <- top$entrez

# load the set of pathways
kpg <- keggPathwayGraphs("hsa")

# set the beta information (see the citated documents for meaning of beta)
kpg <- setEdgeWeights(kpg)

# inlcude the significance information in the analysis (see Voichita:2012 
# for more information)
# set the alpha information based on the pv with one of the predefined methods
kpg <- setNodeWeights(kpg, weights = alphaMLG(pv), defaultWeight = 1)

# perform the pathway analysis
# in order to obtain accurate results the number of boostraps, nboot, should 
# be increase to a number like 2000
pDisRes <- pDis(fc, graphs = kpg, ref = ref, nboot = 100, verbose = TRUE)

# obtain summary of results
head(Summary(pDisRes))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ROntoTools)
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

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

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

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

Loading required package: boot
Loading required package: KEGGREST
Loading required package: KEGGgraph

Attaching package: 'KEGGgraph'

The following object is masked from 'package:graphics':

    plot

Loading required package: Rgraphviz
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ROntoTools/pDis.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pDis
> ### Title: Primary dis-regulation: Pathway analysis approach based on the
> ###   unexplained dis-regulation of genes
> ### Aliases: pDis
> 
> ### ** Examples
> 
> 
> # load a multiple sclerosis study (public data available in Array Express 
> # ID: E-GEOD-21942)
> # This file contains the top table, produced by the limma package with 
> # added gene information. All the probe sets with no gene associate to them,
> # have been removed. Only the most significant probe set for each gene has been
> # kept (the table is already ordered by p-value)
> # The table contains the expression fold change and signficance of each  
> # probe set in peripheral blood mononuclear cells (PBMC) from 12 MS patients
> # and 15 controls.
> load(system.file("extdata/E-GEOD-21942.topTable.RData", package = "ROntoTools"))
> head(top)
                 logFC      P.Value    adj.P.Val     entrez
200946_x_at -1.0175141 5.833411e-13 4.172652e-09   hsa:2746
228697_at   -3.6479368 7.985427e-13 4.172652e-09 hsa:135114
210254_at    3.2807123 3.086572e-12 9.677020e-09    hsa:932
234726_s_at -0.9792301 7.368175e-12 1.760593e-08  hsa:64418
215905_s_at -1.7733135 7.861797e-12 1.760593e-08   hsa:9410
235542_at   -0.9447467 1.617944e-11 2.536288e-08 hsa:200424
> 
> # select differentially expressed genes at 1% and save their fold change in a 
> # vector fc and their p-values in a vector pv
> fc <- top$logFC[top$adj.P.Val <= .01]
> names(fc) <- top$entrez[top$adj.P.Val <= .01]
> 
> pv <- top$P.Value[top$adj.P.Val <= .01]
> names(pv) <- top$entrez[top$adj.P.Val <= .01]
> 
> # alternativly use all the genes for the analysis
> # NOT RUN: 
> # fc <- top$logFC
> # names(fc) <- top$entrez
> 
> # pv <- top$P.Value
> # names(pv) <- top$entrez
> 
> # get the reference
> ref <- top$entrez
> 
> # load the set of pathways
> kpg <- keggPathwayGraphs("hsa")
Using cached pathway data. Database info:
pathway          KEGG Pathway Database
path             Release 73.0+/01-03, Jan 15
                 Kanehisa Laboratories
                 343,170 entries
Default parameters detected. Using pre-parsed data.
> 
> # set the beta information (see the citated documents for meaning of beta)
> kpg <- setEdgeWeights(kpg)
> 
> # inlcude the significance information in the analysis (see Voichita:2012 
> # for more information)
> # set the alpha information based on the pv with one of the predefined methods
> kpg <- setNodeWeights(kpg, weights = alphaMLG(pv), defaultWeight = 1)
> 
> # perform the pathway analysis
> # in order to obtain accurate results the number of boostraps, nboot, should 
> # be increase to a number like 2000
> pDisRes <- pDis(fc, graphs = kpg, ref = ref, nboot = 100, verbose = TRUE)
Performing pathway analysis...
   |                                                                               |                                                                      |   0%   |                                                                               |                                                                      |   1%   |                                                                               |=                                                                     |   1%   |                                                                               |=                                                                     |   2%   |                                                                               |==                                                                    |   3%   |                                                                               |===                                                                   |   4%   |                                                                               |===                                                                   |   5%   |                                                                               |====                                                                  |   5%   |                                                                               |====                                                                  |   6%   |                                                                               |=====                                                                 |   7%   |                                                                               |======                                                                |   8%   |                                                                               |======                                                                |   9%   |                                                                               |=======                                                               |   9%   |                                                                               |=======                                                               |  10%   |                                                                               |========                                                              |  11%   |                                                                               |========                                                              |  12%   |                                                                               |=========                                                             |  13%   |                                                                               |==========                                                            |  14%   |                                                                               |==========                                                            |  15%   |                                                                               |===========                                                           |  15%   |                                                                               |===========                                                           |  16%   |                                                                               |============                                                          |  17%   |                                                                               |=============                                                         |  18%   |                                                                               |=============                                                         |  19%   |                                                                               |==============                                                        |  19%   |                                                                               |==============                                                        |  20%   |                                                                               |===============                                                       |  21%   |                                                                               |================                                                      |  22%   |                                                                               |================                                                      |  23%   |                                                                               |=================                                                     |  24%   |                                                                               |=================                                                     |  25%   |                                                                               |==================                                                    |  26%   |                                                                               |===================                                                   |  27%   |                                                                               |===================                                                   |  28%   |                                                                               |====================                                                  |  28%   |                                                                               |====================                                                  |  29%   |                                                                               |=====================                                                 |  30%   |                                                                               |======================                                                |  31%   |                                                                               |======================                                                |  32%   |                                                                               |=======================                                               |  32%   |                                                                               |=======================                                               |  33%   |                                                                               |=======================                                               |  34%   |                                                                               |========================                                              |  34%   |                                                                               |========================                                              |  35%   |                                                                               |=========================                                             |  36%   |                                                                               |==========================                                            |  37%   |                                                                               |==========================                                            |  38%   |                                                                               |===========================                                           |  38%   |                                                                               |===========================                                           |  39%   |                                                                               |============================                                          |  40%   |                                                                               |=============================                                         |  41%   |                                                                               |=============================                                         |  42%   |                                                                               |==============================                                        |  42%   |                                                                               |==============================                                        |  43%   |                                                                               |===============================                                       |  44%   |                                                                               |===============================                                       |  45%   |                                                                               |================================                                      |  46%   |                                                                               |=================================                                     |  47%   |                                                                               |=================================                                     |  48%   |                                                                               |==================================                                    |  48%   |                                                                               |==================================                                    |  49%   |                                                                               |===================================                                   |  50%   |                                                                               |====================================                                  |  51%   |                                                                               |====================================                                  |  52%   |                                                                               |=====================================                                 |  52%   |                                                                               |=====================================                                 |  53%   |                                                                               |======================================                                |  54%   |                                                                               |=======================================                               |  55%   |                                                                               |=======================================                               |  56%   |                                                                               |========================================                              |  57%   |                                                                               |========================================                              |  58%   |                                                                               |=========================================                             |  58%   |                                                                               |=========================================                             |  59%   |                                                                               |==========================================                            |  60%   |                                                                               |===========================================                           |  61%   |                                                                               |===========================================                           |  62%   |                                                                               |============================================                          |  62%   |                                                                               |============================================                          |  63%   |                                                                               |=============================================                         |  64%   |                                                                               |==============================================                        |  65%   |                                                                               |==============================================                        |  66%   |                                                                               |===============================================                       |  66%   |                                                                               |===============================================                       |  67%   |                                                                               |===============================================                       |  68%   |                                                                               |================================================                      |  68%   |                                                                               |================================================                      |  69%   |                                                                               |=================================================                     |  70%   |                                                                               |==================================================                    |  71%   |                                                                               |==================================================                    |  72%   |                                                                               |===================================================                   |  72%   |                                                                               |===================================================                   |  73%   |                                                                               |====================================================                  |  74%   |                                                                               |=====================================================                 |  75%   |                                                                               |=====================================================                 |  76%   |                                                                               |======================================================                |  77%   |                                                                               |======================================================                |  78%   |                                                                               |=======================================================               |  79%   |                                                                               |========================================================              |  80%   |                                                                               |========================================================              |  81%   |                                                                               |=========================================================             |  81%   |                                                                               |=========================================================             |  82%   |                                                                               |==========================================================            |  83%   |                                                                               |===========================================================           |  84%   |                                                                               |===========================================================           |  85%   |                                                                               |============================================================          |  85%   |                                                                               |============================================================          |  86%   |                                                                               |=============================================================         |  87%   |                                                                               |==============================================================        |  88%   |                                                                               |==============================================================        |  89%   |                                                                               |===============================================================       |  90%   |                                                                               |===============================================================       |  91%   |                                                                               |================================================================      |  91%   |                                                                               |================================================================      |  92%   |                                                                               |=================================================================     |  93%   |                                                                               |==================================================================    |  94%   |                                                                               |==================================================================    |  95%   |                                                                               |===================================================================   |  95%   |                                                                               |===================================================================   |  96%   |                                                                               |====================================================================  |  97%   |                                                                               |===================================================================== |  98%   |                                                                               |===================================================================== |  99%   |                                                                               |======================================================================|  99%   |                                                                               |======================================================================| 100%Analysis completed in 3.52077 secs.
> 
> # obtain summary of results
> head(Summary(pDisRes))
              totalpDis totalpDisNorm      ppDis         pORA        pComb
path:hsa05010 112.02331      2.490643 0.03960396 1.360242e-05 8.314496e-06
path:hsa05110  82.39166      4.293900 0.00990099 1.085083e-04 1.583985e-05
path:hsa04145 102.93799      6.762435 0.00990099 2.424942e-04 3.346817e-05
path:hsa04722  96.82865      3.217279 0.00990099 4.644830e-04 6.111726e-05
path:hsa03015  54.07253      3.166901 0.00990099 6.821488e-04 8.716229e-05
path:hsa05016 121.64470      3.893293 0.00990099 6.852905e-04 8.753255e-05
               ppDis.fdr    pORA.fdr   pComb.fdr
path:hsa05010 0.04933714 0.001999556 0.001164229
path:hsa05110 0.01842336 0.007975357 0.001164229
path:hsa04145 0.01842336 0.011882215 0.001639940
path:hsa04722 0.01842336 0.016789618 0.002144548
path:hsa03015 0.01842336 0.016789618 0.002144548
path:hsa05016 0.01842336 0.016789618 0.002144548
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>