R: Plot components from isoPLSDA analysis (pairs plot)
isoPLSDAplot
R Documentation
Plot components from isoPLSDA analysis (pairs plot)
Description
Plot the most significant components that come from isoPLSDA
analysis together with the density of the samples scores along those components.
Usage
isoPLSDAplot(pls)
Arguments
pls
output from isoPLSDA function.
Details
The function isoPLSDAplot
helps to visualize the results from isoPLSDA.
It will plot the samples using the
significant components (t1, t2, t3 ...) from the PLS-DA analysis and the
samples score distribution along the components.
It uses ggpairs
for the plot.
Value
ggpairs plot showing the scores
for each sample using isomiRs/miRNAs expression to explain
variation.
data.frame object with a first column
refering to the sample group, and the following
columns refering to the score that each sample
has for each
component from the PLS-DA analysis.
Examples
data(mirData)
# Only miRNAs with > 10 reads in all samples.
ids <- isoCounts(mirData, minc=10, mins=6)
ids <- isoNorm(ids)
pls.ids <- isoPLSDA(ids, "condition", nperm = 2)
isoPLSDAplot(pls.ids)
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(isomiRs)
Loading required package: DiscriMiner
Loading required package: IRanges
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:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
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")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/isomiRs/isoPLSDAplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: isoPLSDAplot
> ### Title: Plot components from isoPLSDA analysis (pairs plot)
> ### Aliases: isoPLSDAplot
>
> ### ** Examples
>
> data(mirData)
> # Only miRNAs with > 10 reads in all samples.
> ids <- isoCounts(mirData, minc=10, mins=6)
> ids <- isoNorm(ids)
converting counts to integer mode
-- note: fitType='parametric', but the dispersion trend was not well captured by the
function: y = a/x + b, and a local regression fit was automatically substituted.
specify fitType='local' or 'mean' to avoid this message next time.
> pls.ids <- isoPLSDA(ids, "condition", nperm = 2)
> isoPLSDAplot(pls.ids)
condition t1 t2 t3
nb1 nb 16.685809 -12.841132 2.490488
nb2 nb 3.040456 15.827478 5.625597
nb3 nb 9.342125 7.150871 -7.018976
o1 o -9.240669 -2.075327 -3.915473
o2 o -9.706194 -3.463364 -1.790136
o3 o -10.121527 -4.598526 4.608499
>
>
>
>
>
> dev.off()
null device
1
>