ds.exposome_pca_plot: Plot an ExposomeSet PCA

View source: R/ds.exposome_pca_plot.R

ds.exposome_pca_plotR Documentation

Plot an ExposomeSet PCA

Description

Plots the results of a PCA of an ExposomeSet on the server side.

Usage

ds.exposome_pca_plot(
  pca_object = "ds.exposome_pca.Results",
  set = "all",
  type = "meta",
  labels = FALSE,
  phenotype = NA,
  method = 1,
  k = 3,
  noise = 1,
  datasources = NULL
)

Arguments

pca_object

character (default "ds.exposome_pca") Name of the PCA ExposomeSet on the study server to visualize. Created by the ds.exposome_pca function.

set

character (default "all") Argument to specify the type of plot to visualize. Options: '\n'

-"all": Mosaic plot with the samples, exposures and variance plots. '\n' -"exposures": Plot of the exposures space on the first two principal components, color coded by family. '\n' -"samples": Plot of the individuals space on the first two principal components, this plot can take the 'phenotype' argument to color code the individuals by phenotypes. '\n' -"variance": Plot of the variance explained by each principal component. '\n' -"variance_explained": Plot of the accumulated variance explained by each principal component. '\n' -"exposures_correlation": Correlation between principal components and exposures '\n' -"phenotypes_correlation": Association between principal components and phenotypes '\n'

type

character (default "meta") If "meta" the results of all the study servers will be combined, which fundamentally only affects set = "all" and set = "samples". This is to be used when performing ds.exposome_pca(type = "pooled"), the only plot that is not actually pooled (at the moment) is set = "phenotypes_correlation". If "pooled" the results of the first study server will be plotted, if a different study server is to be plotted, pass the specific one to the datasources argument (datasources[x]).

labels

bool (default FALSE) Show labels of the exposures, only applies to set = "exposures".

phenotype

character (default NA) Phenotype to color code the "exposures" plot.

method

numeric (default 1) (1) deterministic method to anonimize the scatter plot (uses k). (2) probabilistic method to anonimize the scatter plot (uses noise).

k

numeric (default 3) The number of the nearest neighbors for which their centroid is calculated, applied for method = 1

noise

numeric (default 1) The percentage of the initial variance that is used as the variance of the embedded noise.

datasources

a list of DSConnection-class (default NULL) objects obtained after login

Examples

## Not run: Refer to the package Vignette for examples.

isglobal-brge/dsExposomeClient documentation built on March 5, 2024, 12:26 p.m.