rnb.plot.dreduction(rnb.set, plot.type = "pca", dimensions = 1:2, distance.metric = "euclidean", target = "sites", point.types = 0L, point.colors = 0L, legend.space = 2)
RnBSet
. This dataset
must contain at least four samples."pca"
(projection to two principal
components) or "mds"
(multidimensional scaling to two dimensions). The section
Details provides more details on how the dimension reduction techniques are applied.integer
values giving the principle components to be shown in
the horizontal and vertical axis of the plot. This parameter is considered only when
plot.type
is "pca"
."eucledian"
or "manhattan"
. The second metric is supported only
in multidimensional scaling."sites"
(individual CpGs) or one of the region types summarized in rnb.set
.rnb.set
, to
be used to define point types in the plot. Setting this parameter to zero (default) or to a
trait that does not define categories results in all samples being displayed as filled
circles. If this parameter specifies a column that can be used as sample identifiers, the plot
displays the samples as identifiers instead of points.rnb.set
, to
be used to define sample colors in the plot. Setting this parameter to zero (default) or to a
trait that does not define categories results in all samples being displayed in black.ggplot
. The object also contains an
attribute "info"
, which is a list with the following elements:
"Target"
target
."Technique"
"PCA"
or "MDS"
."All"
"Missing"
"Selected"
"Explained"
0
and 1
showing the variance explained by the
selected dimensions, as a fraction of the total variance of all dimensions."exploratory.top.dimensions"
controls whether dimension reduction is applied on all
probes, sites or regions available in the given dataset, or only on the most variable ones. In case a trait is mapped
to point types, the shapes to use are taken from the option "points.category"
. Similary, the option
"colors.category"
determines which colors are used when mapping to color is applied. See
RnBeads Options for more information on these options.
summarized.regions
for listing all region types summarized
in a dataset
library(RnBeads.hg19)
data(small.example.object)
pdf("PCA.pdf", width = 7.2, height = 5.2)
print(rnb.plot.dreduction(rnb.set.example, point.colors="Sample_Group"))
dev.off()
Run the code above in your browser using DataLab