Description Usage Arguments Details Value Author(s) References See Also Examples
Represents samples from multiple coordinates.
1 2 3 4 |
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.
none
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 | ## plot of individuals for objects of class 'rcc'
# ----------------------------------------------------
dev.off()
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)
plotArrow(nutri.res, group = nutrimouse$genotype,
legend = TRUE)
## Not run:
## plot of individuals for objects of class 'pls' or 'spls'
# ----------------------------------------------------
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)
# 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')
## variable representation for objects of class 'sgcca' (or 'rgcca')
# ----------------------------------------------------
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)
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')
## variable representation for objects of class 'sgccda'
# ----------------------------------------------------
# Note: the code differs from above as we use a 'supervised' GCCA analysis
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)
# 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.