Last data update: 2014.03.03

R: Plot object from read.mir or a selected gene and respective...
plotRmiRtcR Documentation

Plot object from read.mir or a selected gene and respective miRNAs from a miRtcList object

Description

Ploting function for object coming from read.mir or a selected gene and respective miRNAs from a miRtcList object

Usage

  plotRmiRtc(miRtcObj,gene_id=NULL,timeunit="Time",legend.x=NULL,legend.y=NULL,svgTips=FALSE,svgname=NULL,height=10,width=15)

Arguments

miRtcObj

A data.frame resulting from read.mir or RmiR functions or a miRtcList-class object.

gene_id

Selected gene_id contained in a miRtcList-class object.

timeunit

Name for the abscissae axes, normally a time unit like "Hours", "PD" etc.

legend.x

Position of the legend in the x-axes.

legend.y

Position of the legend in the y-axes.

svgTips

TRUE if you want to use the RSVGTipsDevice, default is FALSE.

svgname

Name for the SVG image output.

height

Height of the graphs.

width

Width of the graphs.

Details

The function plots the trends of a gene target with the specified gene_id and respective miRNA contained in a miRtcList-class object.

If the miRtcObj argument is a dataframe coming from read.mir function, the resulting plot will be a point graph in SVG format. Each couple miRNA/Target is a point, the x value is the gene target expression value and the y value is the microRNA expression value. To decrease the size of the graph is possible to select just the desired miRNAs or gene targets in the data.frame

See Also

readRmiRtc,miRtcList

Examples

	
        data(RmiR)
        res1 <- read.mir(genes=gene1, mirna=mir1, annotation="hgug4112a.db")
        res2 <- read.mir(genes=gene2, mirna=mir2, annotation="hgug4112a.db")
        res3 <- read.mir(genes=gene3, mirna=mir3, annotation="hgug4112a.db")

        res_tc <- RmiRtc(timeline=c("res1", "res2", "res3"),
			 timevalue=c(12, 48, 72))
        res <- readRmiRtc(res_tc, correlation=-0.9, exprLev=1,
			  annotation="hgug4112a.db")

	## List of genes with anti-correlated miRNAs:
        
	res$reps

	## Plot of the first gene of the list:
	plotRmiRtc (res, gene_id=351, timeunit="Hours")

	## Setting the position of the legend:
	
	plotRmiRtc (res,gene_id=351, legend.x=50, legend.y=0, timeunit="Hours")

	## Plot with RSVGTipsDevice:
	
	plotRmiRtc (res,gene_id=351, legend.x=50, legend.y=0, timeunit="Hours",
		    svgTips=TRUE)

	## Plot of a read.mir results:
	
	plotRmiRtc (res1, svgname="gene1.svg", svgTips=TRUE)
   

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(RmiR)
Loading required package: RmiR.Hs.miRNA
This package has not been updated by it's contributor since 2009.
Loading required package: RSVGTipsDevice
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RmiR/plotRmiRtc.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotRmiRtc
> ### Title: Plot object from read.mir or a selected gene and respective
> ###   miRNAs from a miRtcList object
> ### Aliases: plotRmiRtc
> 
> ### ** Examples
> 
> 	
>         data(RmiR)
>         res1 <- read.mir(genes=gene1, mirna=mir1, annotation="hgug4112a.db")
Loading required package: hgug4112a.db
Loading required package: AnnotationDbi
Loading required package: stats4
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: Biobase
Welcome to Bioconductor

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

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: org.Hs.eg.db


>         res2 <- read.mir(genes=gene2, mirna=mir2, annotation="hgug4112a.db")
>         res3 <- read.mir(genes=gene3, mirna=mir3, annotation="hgug4112a.db")
> 
>         res_tc <- RmiRtc(timeline=c("res1", "res2", "res3"),
+ 			 timevalue=c(12, 48, 72))
>         res <- readRmiRtc(res_tc, correlation=-0.9, exprLev=1,
+ 			  annotation="hgug4112a.db")
> 
> 	## List of genes with anti-correlated miRNAs:
>         
> 	res$reps
  symbol miRNAs gene_id
2    APP      3     351
3  VLDLR      3    7436
1  CENPV      1  201161
> 
> 	## Plot of the first gene of the list:
> 	plotRmiRtc (res, gene_id=351, timeunit="Hours")
> 
> 	## Setting the position of the legend:
> 	
> 	plotRmiRtc (res,gene_id=351, legend.x=50, legend.y=0, timeunit="Hours")
> 
> 	## Plot with RSVGTipsDevice:
> 	
> 	plotRmiRtc (res,gene_id=351, legend.x=50, legend.y=0, timeunit="Hours",
+ 		    svgTips=TRUE)
png 
  2 
> 
> 	## Plot of a read.mir results:
> 	
> 	plotRmiRtc (res1, svgname="gene1.svg", svgTips=TRUE)
png 
  2 
>    
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>