Description Usage Arguments Details Author(s) References See Also Examples
Represents samples from multiple coordinates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
object |
object of class inheriting from mixOmics: |
comp |
integer vector of length two indicating the components represented on the horizontal and the vertical axis to project the individuals. |
abline |
should the vertical and horizontal line through the center be plotted? Default set to |
xlim |
the ranges to be encompassed by the x axis, if |
ylim |
the ranges to be encompassed by the y axis, if |
group |
factor indicating the group membership for each sample. Coded as default for the supervised method |
col |
character (or symbol) color to be used, color vector also possible. |
cex |
numeric character (or symbol) expansion, , color vector also possible. |
pch |
plot character. A character string or a vector of single characters
or integers. See |
title |
set of characters for the title plot. |
plot.arrows |
boolean. Whether arrows should be added or not. Default is |
legend |
boolean. Whether the legend should be added. Only for the supervised methods and if group!=NULL. Default is |
X.label |
x axis titles. |
Y.label |
y axis titles. |
ind.names |
If |
position.names |
One of |
Graphical of the samples (individuals) is displayed in a superimposed manner where each sample will be indicated using an arrow. The start of the arrow indicates the location of the sample in X in one plot, and the tip the location of the sample in Y in the other plot.
For objects of class "GCCA"
and if there are more than 3 blocks, the start of the arrow indicates the centroid between all data sets for a given individual and the tips of the arrows the location of that individual in each block.
Short arrows indicate a strong agreement between the matching data sets, long arrows a disagreement between the matching data sets.
Francois Bartolo, Kim-Anh Lê Cao.
Lê Cao, K.-A., Martin, P.G.P., Robert-Granie, C. and Besse, P. (2009). Sparse canonical methods for biological data integration: application to a cross-platform study. BMC Bioinformatics 10:34.
arrows
, text
, points
and http://mixOmics.org/graphics for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ## plot of individuals for objects of class 'rcc'
# ----------------------------------------------------
data(nutrimouse)
X <- nutrimouse$lipid
Y <- nutrimouse$gene
nutri.res <- rcc(X, Y, ncomp = 3, lambda1 = 0.064, lambda2 = 0.008)
plotArrow(nutri.res)
# names indicate genotype
plotArrow(nutri.res,
group = nutrimouse$genotype, ind.names = nutrimouse$genotype)
## Not run:
plotArrow(nutri.res, group = nutrimouse$genotype,
legend = TRUE)
## End(Not run)
## plot of individuals for objects of class 'pls' or 'spls'
# ----------------------------------------------------
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50),
keepY = c(10, 10, 10))
#default
plotArrow(toxicity.spls)
## Not run:
# colors indicate time of necropsy, text is the dose
plotArrow(toxicity.spls, group = liver.toxicity$treatment[, 'Time.Group'],
ind.names = liver.toxicity$treatment[, 'Dose.Group'],
legend = TRUE)
# colors indicate time of necropsy, text is the dose, label at start of arrow
plotArrow(toxicity.spls, group = liver.toxicity$treatment[, 'Time.Group'],
ind.names = liver.toxicity$treatment[, 'Dose.Group'],
legend = TRUE, position.names = 'start')
## End(Not run)
## variable representation for objects of class 'sgcca' (or 'rgcca')
# ----------------------------------------------------
data(nutrimouse)
Y = unmap(nutrimouse$diet)
data = list(gene = nutrimouse$gene, lipid = nutrimouse$lipid, Y = Y)
design1 = matrix(c(0,1,1,1,0,1,1,1,0), ncol = 3, nrow = 3, byrow = TRUE)
nutrimouse.sgcca <- wrapper.sgcca(X = data,
design = design1,
penalty = c(0.3, 0.5, 1),
ncomp = 3,
scheme = "centroid")
# default style: same color for all samples
plotArrow(nutrimouse.sgcca)
## Not run:
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot')
# ind.names to visualise the unique individuals
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = TRUE)
# ind.names to visualise the unique individuals
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = TRUE,position.names = 'start')
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = TRUE,position.names = 'end')
# ind.names indicates the diet
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = nutrimouse$diet, position.names= 'start')
# ind.names to visualise the unique individuals, start position
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = TRUE, position.names = 'start')
# end position
plotArrow(nutrimouse.sgcca, group = nutrimouse$diet, legend =TRUE,
title = 'my plot', ind.names = TRUE, position.names = 'end')
## End(Not run)
## variable representation for objects of class 'sgccda'
# ----------------------------------------------------
# Note: the code differs from above as we use a 'supervised' GCCA analysis
data(nutrimouse)
Y = nutrimouse$diet
data = list(gene = nutrimouse$gene, lipid = nutrimouse$lipid)
design1 = matrix(c(0,1,0,1), ncol = 2, nrow = 2, byrow = TRUE)
nutrimouse.sgccda1 <- wrapper.sgccda(X = data,
Y = Y,
design = design1,
ncomp = 2,
keepX = list(gene = c(10,10), lipid = c(15,15)),
scheme = "centroid")
# default colors correspond to outcome Y
plotArrow(nutrimouse.sgccda1)
## Not run:
# with legend and title and indiv ID
plotArrow(nutrimouse.sgccda1, legend = TRUE, title = 'my sample plot',
ind.names = TRUE, position.names = 'start')
## End(Not run)
|
Loading required package: MASS
Loading required package: lattice
Loading required package: ggplot2
Loaded mixOmics 6.3.2
Thank you for using mixOmics!
How to apply our methods: http://www.mixOmics.org for some examples.
Questions or comments: email us at mixomics[at]math.univ-toulouse.fr
Any bugs? https://bitbucket.org/klecao/package-mixomics/issues
Cite us: citation('mixOmics')
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
Design matrix has changed to include Y; each block will be linked to Y.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.