Last data update: 2014.03.03

R: Function to use clipper method on microarray or RNA-Seq data
clipperR Documentation

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

Description

clipper is a method for topological gene set analysis. It implements a two-step empirical approach based on the exploitation of graph decomposition into a junction tree to reconstruct the most relevant signal path. In the first step clipper selects significant pathways according to statistical tests on the means and the concentration matrices of the graphs derived from pathway topologies. Then, it "clips" the whole pathway identifying the signal paths having the greatest association with a specific phenotype.

Usage

clipper(x, group, pathways, type, preparePaths=TRUE, norm.method=NULL, test.method=NULL,  method="mean", testCliques=FALSE, nperm=1000, alphaV=0.05, b=1000, permute=TRUE,
   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 input 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.

method

Character, "mean" or "var", the kind of test to perform on the cliques

testCliques

Logical, if TRUE then the test is applied also on the cliques of the each pathway. It is a very time consuming calculation, especially for many or big pathways

nperm

Number of permutations

alphaV

Numeric, the threshold for variance test. The calculation of mean test depends on the result of variance test.

b

number of permutations for mean analysis

permute

always performs permutations in the concentration matrix test. If FALSE, the test is made using the asymptotic distribution of the log-likelihood ratio. This option should be use only if samples size is >=40 per class

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

Arguments for the preparePathways()

Value

A list,

res

A list. First slot is a data frame containing p-values and q-values of mean and variance tests on pathways. The second slot is a list containing data.frames of the most affected paths in each pathway. The columns of the data frames contain: 1 - Index of the starting clique 2 - Index of the ending clique 3 - Index of the clique where the maximum value is reached 4 - length of the path 5 - maximum score of the path 6 - average score along the path 7 - percentage of path activation 8 - impact of the path on the entire pathway 9 - clique involved and significant 10 - clique forming the path 11 - genes forming the significant cliques 12 - genes forming the path

topo.sig

if testCliques=TRUE, a list where each slot contains the pvalues and a list of cliques in one pathway. NULL otherwise

degtest

A data.frame of gene-level differential expression statistics

Note

If there are NA's only in columns 3 to 7, then a junction tree could not be formed.

Author(s)

Ivana Ihnatova

References

Martini P, Sales G, Massa MS, Chiogna M, Romualdi C. Along signal paths: an empirical gene set approach exploiting pathway topology. Nucleic Acids Res. 2013 Jan 7;41(1):e19. doi: 10.1093/nar/gks866. Epub 2012 Sep 21. PubMed PMID: 23002139; PubMed Central PMCID: PMC3592432.

See Also

preparePathways

Examples



if (require(DEGraph)) {
  data("Loi2008_DEGraphVignette")
 pathways<-pathways("hsapiens","kegg")[1]
  clipper( exprLoi2008, classLoi2008, pathways,type="MA", convertTo="none")
}   

## 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","kegg")[1:3]
 clipper(hnrnp.cnts, group,pathways, type="RNASeq",  norm.method="TMM", convertTo="none")
 }

## 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/Clipper.Rd_%03d_medium.png", width=480, height=480)
> ### Name: clipper
> ### Title: Function to use clipper method on microarray or RNA-Seq data
> ### Aliases: clipper
> ### Keywords: htest
> 
> ### ** Examples
> 
> 
> 
> if (require(DEGraph)) {
+   data("Loi2008_DEGraphVignette")
+  pathways<-pathways("hsapiens","kegg")[1]
+   clipper( exprLoi2008, classLoi2008, pathways,type="MA", convertTo="none")
+ }   
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","kegg")[1:3]
> ##D  clipper(hnrnp.cnts, group,pathways, type="RNASeq",  norm.method="TMM", convertTo="none")
> ##D  }
> ## End(Not run)
>     
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>