Last data update: 2014.03.03

R: Plot variable (gene) spaces of result from MCIA or CIA
plotVarR Documentation

Plot variable (gene) spaces of result from MCIA or CIA

Description

The user level function for plotting variable space of mcia or cia, which could be used to visualize selected variables (genes) across datasets. It calls plotVar.cia or plotVar.mcia.

Usage

  plotVar(x, var = NA, axes = 1:2, 
          var.col = "red", var.lab = FALSE, bg.var.col = "gray", 
          nlab = 0, sepID.data=NULL, sepID.sep="_", ...)

Arguments

x

An object of class cia or mcia

var

A character vector defining the variables (genes) are going to be labelled and coloured. The default NA means no variables (genes) selected.

axes

An integer vector in length 2 indicating which axes are going to be plotted. Default are the first two axes.

var.col

The colour of selected variables (genes), the length of this argument should be either 1 (uniform colour) or the length of var (each var has a specified colour).

var.lab

A logical indicating if the variables (genes) selected should be labelled, the default is FALSE

bg.var.col

Colour code for unselected variables (genes) in all datasets.

nlab

An integer indicating how many top weighted genes on each axis should be labelled.

sepID.data

This argument enables a more generalized mapping of identifiers in different datasets. For example, if there is a PTM (post-transcriptional modification) dataset in one of the data.frames, the corresponding protein could be detected with setting this argument. For more details, see "details" section.

sepID.sep

Used to help determine the separator of variables (genes) in the sepID.data. For more details, see "details" section.

...

Other arguments

Details

For the sepID.data, a typical example is the post-transcriptional modification (PTM) data. The name of variables (genes) have a general form like "proteinName_modificationSite". The sepID.data specifies the IDs from dataset that should be separated, sepID.sep specifies the separator of protein name and modification site. This is used to determine the same proteins/genes across different datasets.

Value

If var is not NA, a data frame is returned, with rows for variables (genes) of interest and columns of logical values indicating which dataset contains which variables (genes).

Author(s)

Chen Meng

See Also

See Also as plotVar.cia, plotVar.mcia

Examples


data(NCI60_4arrays)
mcoin <- mcia(NCI60_4arrays)
plotVar(mcoin, var=c("S100B", "S100A1"), var.lab=TRUE)

# an example for the usage of sepID.data and sepID.sep
nci60_mod <- NCI60_4arrays
rownames(nci60_mod$hgu95) <- paste(rownames(nci60_mod$hgu95), "s1", sep="_")
mcoin_mod <- mcia(nci60_mod)
# without specifying
plotVar(mcoin_mod, var=c("S100B", "S100A1"), var.lab=TRUE)
# specifying the sepID.data and sepID.sep
plotVar(mcoin_mod, var=c("S100B", "S100A1"), var.lab=TRUE, sepID.data=4, sepID.sep="_")

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(omicade4)
Loading required package: ade4
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/omicade4/plotVar.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotVar
> ### Title: Plot variable (gene) spaces of result from MCIA or CIA
> ### Aliases: plotVar
> 
> ### ** Examples
> 
> 
> data(NCI60_4arrays)
> mcoin <- mcia(NCI60_4arrays)
> plotVar(mcoin, var=c("S100B", "S100A1"), var.lab=TRUE)
  Variables agilent hgu133 hgu133p2 hgu95
1     S100B   FALSE  FALSE    FALSE FALSE
2    S100A1   FALSE  FALSE    FALSE FALSE
> 
> # an example for the usage of sepID.data and sepID.sep
> nci60_mod <- NCI60_4arrays
> rownames(nci60_mod$hgu95) <- paste(rownames(nci60_mod$hgu95), "s1", sep="_")
> mcoin_mod <- mcia(nci60_mod)
> # without specifying
> plotVar(mcoin_mod, var=c("S100B", "S100A1"), var.lab=TRUE)
  Variables agilent hgu133 hgu133p2 hgu95
1     S100B   FALSE  FALSE    FALSE FALSE
2    S100A1   FALSE  FALSE    FALSE FALSE
> # specifying the sepID.data and sepID.sep
> plotVar(mcoin_mod, var=c("S100B", "S100A1"), var.lab=TRUE, sepID.data=4, sepID.sep="_")
  Variables agilent hgu133 hgu133p2 hgu95
1     S100B   FALSE  FALSE    FALSE FALSE
2    S100A1   FALSE  FALSE    FALSE  TRUE
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>