checkArgs: Check Arguments passed to the scPCA Function

Description Usage Arguments Value References

View source: R/checkArgs.R

Description

Checks whether or not the all arguments in the scPCA functions are input properly.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
checkArgs(
  target,
  background,
  center,
  scale,
  n_eigen,
  contrasts,
  penalties,
  clust_method,
  linkage_method,
  clusters,
  eigdecomp_tol,
  eigdecomp_iter,
  n_centers
)

Arguments

target

The target (experimental) data set, in a standard format such as a data.frame or matrix.

background

The background data set, in a standard format such as a data.frame or matrix.

center

A logical indicating whether the target and background data sets should be centered to mean zero.

scale

A logical indicating whether the target and background data sets should be scaled to unit variance.

n_eigen

A numeric indicating the number of eigenvectors to be computed.

contrasts

A numeric vector of the contrastive parameters.

penalties

A numeric vector of the penalty terms.

clust_method

A character specifying the clustering method to use for choosing the optimal constrastive parameter. Currently, this is limited to either k-means, partitioning around medoids (PAM), and hierarchical clustering. The default is k-means clustering.

linkage_method

A character specifying the agglomerative linkage method to be used if clust_method = "hclust". The options are ward.D2, single, complete, average, mcquitty, median, and centroid. The default is complete.

clusters

A numeric vector of cluster labels for observations in the target data. Defaults to NULL, but is otherwise used to identify the optimal set of hyperparameters when fitting the scPCA and the automated version of cPCA.

eigdecomp_tol

A numeric providing the level of precision used by eigendecompositon calculations.

eigdecomp_iter

A numeric indicating the maximum number of interations performed by eigendecompositon calculations.

n_centers

A numeric giving the number of centers to use in the clustering algorithm. If set to 1, cPCA, as first proposed by \insertCiteerichson2018sparse;textualscPCA, is performed, regardless of what the penalties argument is set to.

Value

Whether all argument conditions are satisfied

References

\insertAllCited
scPCA documentation built on Nov. 8, 2020, 6 p.m.