Last data update: 2014.03.03

R: Function to use DEGraph method on microarray or RNA-Seq data
DEGraphR Documentation

Function to use DEGraph method on microarray or RNA-Seq data

Description

DEGraph implements recent hypothesis testing methods which directly assess whether a particular gene network is differentially expressed between two conditions. In employs Graph Laplacian, Fourier transformation and multivariate T2-statistic

Usage

DEGraph(x, group, pathways, type, preparePaths=TRUE, norm.method=NULL, test.method=NULL, overall="biggest", useInteractionSigns=TRUE, EdgeAttrs=NULL,
   both.directions=TRUE, maxNodes=150, minEdges=0, commonTh=2, filterSPIA=FALSE, convertTo="none", convertBy=NULL)

Arguments

x

An ExpressionSet object or a gene expression data matrix or count matrix, rows refer to genes, columns to samples

group

Name or number of the phenoData column or a character vector or factor that contains required class assigments

pathways

A list of pathways in a form from graphite package or created by preparePathways()

type

Type of the data, "MA" for microarray and "RNASeq" for RNA-Seq

preparePaths

Logical, by default the pathways are transformed with preparePathways(). Use FALSE, if you have done this transformation separately

norm.method

Character, the method to normalize RNAseq data. If NULL then TMM-normalization is performed. Possible values are: "TMM", "DESeq2", "rLog", "none"

test.method

Character, the method for differentiall expression analysis of RNAseq data. If NULL then "voomlimma" is used. Possible values are: "DESeq2", "voomlimma", "vstlimma", "edgeR". This analysis is needed only for the visualization.

overall

Character, how should the overall p-value for a pathway be calculated. The possible values are: "mean", "min", "biggest". "biggest" returns the p-value of the biggest connected component.

useInteractionSigns

Logical, should types of interaction be included in the analysis?

EdgeAttrs

A list containing two data.frames. See makeDefaultEdgeData() for the details. The interactions are assigned signs according to the beta column of the second data.frame. The procedure is similar to the SPIA method

both.directions, maxNodes, minEdges, commonTh, filterSPIA, convertTo, convertBy

Arguments for the preparePathways()

Value

A list:

res

Results from analysis of individual pathways. The first column refers to the overall p-value for a pathway. Then groups of four columns follows. One group refers to one connected component and contains a pair of p-values (without and with Fourier transformation), graph and number of Fourier componets used in the test. The number of groups is equal to the highest number of components in analysed pathways. Components are sorted in the decreasing order of their nodes number.

topo.sig

NULL, present for the compatibility with outputs from other methods

degtest

A data.frame of gene-level statistics of all genes in the dataset

Author(s)

Ivana Ihnatova

References

L. Jacob, P. Neuvial, and S. Dudoit. Gains in power from structured two-sample tests of means on graphs. Technical Report arXiv:q-bio/1009.5173v1, arXiv, 2010.

See Also

preparePathways

Examples


if (require(DEGraph)) {
  data("Loi2008_DEGraphVignette")
  pathways<-pathways("hsapiens","biocarta")[1:10]
    DEGraph(exprLoi2008, classLoi2008, pathways, type="MA")
}
## Not run: 
if (require(gageData)) {

 data(hnrnp.cnts)
 hnrnp.cnts<-hnrnp.cnts[rowSums(hnrnp.cnts)>0,]
 group<-c(rep("sample",4), rep("control",4))
 pathways<-pathways("hsapiens","biocarta")[1:10]
 #pathways<-lapply(pathways, function(p) as(p,"pathway"))
 DEGraph(hnrnp.cnts, group, pathways, type="RNASeq", norm.method="TMM")
}

## End(Not run)

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(ToPASeq)
Loading required package: graphite
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: gRbase
Loading required package: graph
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: Rgraphviz
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ToPASeq/DEGraph.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DEGraph
> ### Title: Function to use DEGraph method on microarray or RNA-Seq data
> ### Aliases: DEGraph
> ### Keywords: htest
> 
> ### ** Examples
> 
> 
> if (require(DEGraph)) {
+   data("Loi2008_DEGraphVignette")
+   pathways<-pathways("hsapiens","biocarta")[1:10]
+     DEGraph(exprLoi2008, classLoi2008, pathways, type="MA")
+ }
Loading required package: DEGraph
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called 'DEGraph'
> ## Not run: 
> ##D if (require(gageData)) {
> ##D 
> ##D  data(hnrnp.cnts)
> ##D  hnrnp.cnts<-hnrnp.cnts[rowSums(hnrnp.cnts)>0,]
> ##D  group<-c(rep("sample",4), rep("control",4))
> ##D  pathways<-pathways("hsapiens","biocarta")[1:10]
> ##D  #pathways<-lapply(pathways, function(p) as(p,"pathway"))
> ##D  DEGraph(hnrnp.cnts, group, pathways, type="RNASeq", norm.method="TMM")
> ##D }
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>