exposome_pca_plotDS: Compute plot parameters for ExposomeSet PCA

View source: R/exposome_pca_plotDS.R

exposome_pca_plotDSR Documentation

Compute plot parameters for ExposomeSet PCA

Description

Computes the parameters and tables needed to be passed to the client so it can render a non-disclosive plot of the PCA of an ExposomeSet

Usage

exposome_pca_plotDS(object, set, phenotype, method, k, noise)

Arguments

object

ExposomeSet PCA Exposome Set PCA object

set

character Argument to specify the type of plot to compute. Options:

-"exposures": Plot of the exposures space on the first two principal components, color coded by family.
-"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.
-"variance": Plot of the variance explained by each principal component.
-"variance_explained": Plot of the accumulated variance explained by each principal component.
-"exposures_correlation": Correlation between principal components and exposures
-"phenotypes_correlation": Association between principal components and phenotypes

phenotype

character Phenotype to color code the "exposures" plot.

method

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

k

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

noise

numeric The percentage of the initial variance that is used as the variance of the embedded noise.

Value

Depending on the set argument it returns:

-set == "exposures"
- data: data frame raw data of the plot geometry
- xlabel: character vector labels of the x axis
- ylabel: character vector labels of the y axis
- fams: character vector name of the families
- labels: character vector name of the labels for the points (option label on the client)

-set == "samples"
- data: data frame raw data of the plot geometry
- xlabel: character vector labels of the x axis
- ylabel: character vector labels of the y axis
- pheno: character vector name of the phenotypes (option phenotype on the client)

-set == "variance"
- data: data frame raw data of the plot geometry
- ylabel: character vector labels of the y axis

-set == "variance_explained"
- data: data frame raw data of the plot geometry
- xline: data frame raw data of the plot x line geometry
- yline: data frame raw data of the plot y line geometry
- ylabel: character vector labels of the y axis

-set == "exposures_correlation"
- data: data frame raw data of the plot geometry

-set == "phenotypes_correlation"
- data: data frame raw data of the plot geometry


isglobal-brge/dsExposome documentation built on Feb. 20, 2023, 11:19 a.m.