Last data update: 2014.03.03

R: Export an ExpressionView file
ExportEVR Documentation

Export an ExpressionView file

Description

Exports the biclusters identified in gene expression data with all the relevant biological data to an XML file that can be read by the ExpressionView Flash applet.

Usage

## S4 method for signature 'ISAModules'
ExportEV(biclusters, eset,
         order=OrderEV(biclusters), filename=file.choose(),
         norm=c("sample", "feature", "raw", "x", "y"), cutoff=0.95,
         description=NULL, GO, KEGG, ...)
## S4 method for signature 'Biclust'
ExportEV(biclusters, eset, order, filename, norm,
         cutoff, description, ...) 
## S4 method for signature 'list'
ExportEV(biclusters, eset, order=OrderEV(biclusters),
         filename=file.choose(),
         norm=c("sample", "feature", "raw", "x", "y"),
         cutoff=0.95, description=NULL, ...) 

Arguments

biclusters

An ISAModules object, a Biclust object, or a named list, the last one possibly coming from the isa2 package.

eset

A ExpressionSet object containing the gene expression data. Please see below how to use this function on other kind of data.

order

A named list (result of the OrderEV function) containing the optimal order. If not specified, an ordering with the default parameters is performed.

filename

The filename of the output file. If not specified, the file is selected via the user interface.

norm

The normalization of the gene expression data. The isa.normalize function can normalize (zero mean and unit variance) the data with respect to the genes or the samples. Possible values: ‘feature’, ‘sample’ and ‘raw’. ‘x’ is the same as ‘feature’ and ‘y’ is the same as ‘sample’. The default value is ‘sample’.

cutoff

The cutoff for the coloring is a value between 0 and 1. It represents the fraction of data points taken into account for the density plots. The default value is 0.95, i.e., the extrema of the coloring are chosen in such a way that 95% of the data points can be represented.

description

A named list containing an alternative description of the data. By default, the metadata is extracted from eset. Please see below how to assemble the data description if you are dealing with data other than gene expression.

GO

A list of three GOListHyperGResult objects, containing the enrichment calculation results for the three Gene Ontology ontologies, for all modules, as returned by the ISAGO function in the eisa package. If not specified, then it is calculated automatically.

KEGG

A GOListHyperGResult object, that contains the of the enrichment calculation results for all modules, against the KEGG pathway database, as returned by the ISAKEGG function in the eisa package. If not specified, then it is calculated automatically.

...

Additional arguments, nothing currently.

Details

If the data is available in the form of a ExpressionSet, the ExportEV function automatically uses the metadata associated with the gene expression data. If the underlying data does not contain any annotations, you can provide them manually, by defining various items in the description list, see the second example below.

Author(s)

Andreas Lüscher andreas.luescher@a3.epfl.ch

See Also

OrderEV, LaunchEV, ISA, biclust

Examples

## Gene expression data
## We use the acute T-cell lymphocytic leukemia (ALL) data together with
## the Iterative Signature Algorithm (ISA).

## Load the package and the ALL data
library(ExpressionView)
library(eisa)
library(ALL)
library(hgu95av2.db)
data(ALL)

## Initialize random number generator to get reproducible results
set.seed(5)

## Find biclusters (=modules)
## To avoid some minutes of waiting, we just load the data
## set included in the 'eisa' package instead of
## really performing the calculation.
#modules <- ISA(ALL, thr.gene=2.7, thr.cond=1.4)
data(ALLModulesSmall)
modules <- ALLModulesSmall

## Realign the gene exptression matrix to optimize arrangements of
## biclusters 
optimalorder <- OrderEV(modules)

## Export the data to an ExpressionView file
## Don't forget to change the filename
## Not run: ExportEV(modules, ALL, optimalorder, filename="file.evf")


## In-silico data
## We use insilico data together with the ISA and manually annotate the
## data set. Simply explore the data file with the Flash applet to
## figure out where the various annotations are placed.

## Load the package
library(ExpressionView)

## Generate noisy in-silico data with dimensions m x n
m <- 50
n <- 500
data <- isa.in.silico(num.rows=m, num.cols=n, noise=0.1,
                      overlap.row=0)[[1]] 

## Find biclusters (=modules)
modules <- isa(data)

## Annotate the rows and columns of data set
rownames(data) <- paste("row", seq_len(nrow(data)))
colnames(data) <- paste("column", seq_len(ncol(data)))

## Add metadata associated with the rows of the data set
rowdata <- outer(1:nrow(data), 1:sample(1:20, 1), function(x, y) {
  paste("row description (", x, ", ", y, ")", sep="")
})
rownames(rowdata) <- rownames(data)
colnames(rowdata) <- paste("row tag", seq_len(ncol(rowdata)))

## Add metadata associated with the columns of the data set 
coldata <- outer(1:ncol(data), 1:sample(1:20, 1), function(x, y) {
  paste("column description (", x, ", ", y, ")", sep="")
})
rownames(coldata) <- colnames(data)
colnames(coldata) <- paste("column tag", seq_len(ncol(coldata)))

## Merge the different annotations in a single list and 
## add a few global things
description <- list(
experiment=list(
	title="Title", 
	xaxislabel="x-Axis Label",
	yaxislabel="y-Axis Label",
	name="Author", 
	lab="Address", 
	abstract="Abstract", 
	url="URL", 
	annotation="Annotation", 
	organism="Organism"),
coldata=coldata,
rowdata=rowdata
)

## Realign the gene exptression matrix to optimize arrangements of
## biclusters 
optimalorder <- OrderEV(modules)

## Export the data to an ExpressionView file
## Don't forget to change the filename
ExportEV(modules, data, optimalorder, filename="file.evf",
         description=description) 

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(ExpressionView)
Loading required package: caTools
Loading required package: bitops
Loading required package: isa2
Loading required package: eisa
Loading required package: Biobase
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

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    runmean

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: GO.db

Loading required package: KEGG.db

KEGG.db contains mappings based on older data because the original
  resource was removed from the the public domain before the most
  recent update was produced. This package should now be considered
  deprecated and future versions of Bioconductor may not have it
  available.  Users who want more current data are encouraged to look
  at the KEGGREST or reactome.db packages

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ExpressionView/ExportEV.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ExportEV
> ### Title: Export an ExpressionView file
> ### Aliases: ExportEV ExportEV-methods ExportEV,ISAModules-method
> ###   ExportEV,Biclust-method ExportEV,list-method
> ### Keywords: cluster
> 
> ### ** Examples
> 
> ## Gene expression data
> ## We use the acute T-cell lymphocytic leukemia (ALL) data together with
> ## the Iterative Signature Algorithm (ISA).
> 
> ## Load the package and the ALL data
> library(ExpressionView)
> library(eisa)
> library(ALL)
> library(hgu95av2.db)
Loading required package: org.Hs.eg.db


> data(ALL)
> 
> ## Initialize random number generator to get reproducible results
> set.seed(5)
> 
> ## Find biclusters (=modules)
> ## To avoid some minutes of waiting, we just load the data
> ## set included in the 'eisa' package instead of
> ## really performing the calculation.
> #modules <- ISA(ALL, thr.gene=2.7, thr.cond=1.4)
> data(ALLModulesSmall)
> modules <- ALLModulesSmall
> 
> ## Realign the gene exptression matrix to optimize arrangements of
> ## biclusters 
> optimalorder <- OrderEV(modules)
ordering 3522 rows ordering rows in module 1  ordering rows in module 2  ordering rows in module 3  ordering rows in module 4  ordering rows in module 5  ordering rows in module 6  ordering rows in module 7  ordering rows in module 8  ordering 128 columns ordering columns in module 1  ordering columns in module 2  ordering columns in module 3  ordering columns in module 4  ordering columns in module 5  ordering columns in module 6  ordering columns in module 7  ordering columns in module 8  ordering done.                                   
> 
> ## Export the data to an ExpressionView file
> ## Don't forget to change the filename
> ## Not run: ExportEV(modules, ALL, optimalorder, filename="file.evf")
> 
> 
> ## In-silico data
> ## We use insilico data together with the ISA and manually annotate the
> ## data set. Simply explore the data file with the Flash applet to
> ## figure out where the various annotations are placed.
> 
> ## Load the package
> library(ExpressionView)
> 
> ## Generate noisy in-silico data with dimensions m x n
> m <- 50
> n <- 500
> data <- isa.in.silico(num.rows=m, num.cols=n, noise=0.1,
+                       overlap.row=0)[[1]] 
> 
> ## Find biclusters (=modules)
> modules <- isa(data)
> 
> ## Annotate the rows and columns of data set
> rownames(data) <- paste("row", seq_len(nrow(data)))
> colnames(data) <- paste("column", seq_len(ncol(data)))
> 
> ## Add metadata associated with the rows of the data set
> rowdata <- outer(1:nrow(data), 1:sample(1:20, 1), function(x, y) {
+   paste("row description (", x, ", ", y, ")", sep="")
+ })
> rownames(rowdata) <- rownames(data)
> colnames(rowdata) <- paste("row tag", seq_len(ncol(rowdata)))
> 
> ## Add metadata associated with the columns of the data set 
> coldata <- outer(1:ncol(data), 1:sample(1:20, 1), function(x, y) {
+   paste("column description (", x, ", ", y, ")", sep="")
+ })
> rownames(coldata) <- colnames(data)
> colnames(coldata) <- paste("column tag", seq_len(ncol(coldata)))
> 
> ## Merge the different annotations in a single list and 
> ## add a few global things
> description <- list(
+ experiment=list(
+ 	title="Title", 
+ 	xaxislabel="x-Axis Label",
+ 	yaxislabel="y-Axis Label",
+ 	name="Author", 
+ 	lab="Address", 
+ 	abstract="Abstract", 
+ 	url="URL", 
+ 	annotation="Annotation", 
+ 	organism="Organism"),
+ coldata=coldata,
+ rowdata=rowdata
+ )
> 
> ## Realign the gene exptression matrix to optimize arrangements of
> ## biclusters 
> optimalorder <- OrderEV(modules)
ordering 50 rows ordering rows in module 1  ordering rows in module 2  ordering rows in module 3  ordering rows in module 4  ordering rows in module 5  ordering rows in module 6  ordering rows in module 7  ordering rows in module 8  ordering rows in module 9  ordering rows in module 10  ordering rows in module 11  ordering rows in module 12  ordering 500 columns ordering columns in module 1  ordering columns in module 2  ordering columns in module 3  ordering columns in module 4  ordering columns in module 5  ordering columns in module 6  ordering columns in module 7  ordering columns in module 8  ordering columns in module 9  ordering columns in module 10  ordering columns in module 11  ordering columns in module 12  ordering done.                                   
> 
> ## Export the data to an ExpressionView file
> ## Don't forget to change the filename
> ExportEV(modules, data, optimalorder, filename="file.evf",
+          description=description) 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>