Last data update: 2014.03.03

R: Create diagnostic plot for understanding the Roleswitch model...
diagnosticPlotR Documentation

Create diagnostic plot for understanding the Roleswitch model outputs.

Description

Create diagnostic plot for understanding the roleswitch outputs. Create a 2 by 4 panels of plots. From left to right, the top panel displays the observed N mRNA and M miRNA expression (x.o and z.o), the N by M seed-match matrix (c), and the inferred total mRNA expression; the bottom panel displays the inferred probability of the M miRNAs targeting the N mRNA (miRNA-mRNA; p.x), the probability of the N mRNA "targeting" the M miRNAs (mRNA-miRNA; p.z), the dot product of the above two matrices (Joint) and the convergence rate (delta.p.all).

Usage

diagnosticPlot(pred)

Arguments

pred

Results obtained from roleswitch.

Author(s)

Yue Li

References

Li, Y., ..., Zhang, Z., Inference of personalized miRNA-mRNA interactions toward redefining cancer signatures (in preparation).

See Also

roleswitch

Examples

x.o <- matrix(abs(rnorm(10, mean=3)), 
  dimnames=list(c(1:10),"mRNA")) # mRNA expression
  
z.o <- matrix(abs(rnorm(4, mean=3)),
  dimnames=list(c(1:4),"miRNA"))  # miRNA expression
  
c <- matrix(rpois(40, lambda=3),nrow=nrow(x.o), 
  dimnames=list(c(1:10),c(1:4))) # seed match matrix

rs.pred <- roleswitch(x.o, z.o, c)

diagnosticPlot(rs.pred)

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(Roleswitch)
Loading required package: pracma
Loading required package: reshape
Loading required package: plotrix
Loading required package: microRNA
Loading required package: biomaRt
Loading required package: Biostrings
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: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

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

    expand, rename

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: XVector
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: DBI
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Roleswitch/diagnosticPlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: diagnosticPlot
> ### Title: Create diagnostic plot for understanding the Roleswitch model
> ###   outputs.
> ### Aliases: diagnosticPlot
> ### Keywords: plot
> 
> ### ** Examples
> 
> x.o <- matrix(abs(rnorm(10, mean=3)), 
+   dimnames=list(c(1:10),"mRNA")) # mRNA expression
>   
> z.o <- matrix(abs(rnorm(4, mean=3)),
+   dimnames=list(c(1:4),"miRNA"))  # miRNA expression
>   
> c <- matrix(rpois(40, lambda=3),nrow=nrow(x.o), 
+   dimnames=list(c(1:10),c(1:4))) # seed match matrix
> 
> rs.pred <- roleswitch(x.o, z.o, c)

Start roleswitch with 4 miRNA and 10 mRNA
1: max(p.x-p.x.prev)=0.86294
2: max(p.x-p.x.prev)=0.00019
3: max(p.x-p.x.prev)=0.00006
4: max(p.x-p.x.prev)=0.00000
> 
> diagnosticPlot(rs.pred)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>