K2tax: Function to K2 Taxonomer partitioning

View source: R/K2tax.R

K2taxR Documentation

Function to K2 Taxonomer partitioning

Description

This function performs K2 Taxonomer procedure only. Arguments values are extracted from K2meta(K2res) unless specified otherwise.

Usage

K2tax(
  K2res,
  nFeats = NULL,
  featMetric = NULL,
  recalcDataMatrix = NULL,
  nBoots = NULL,
  clustFunc = NULL,
  useCors = NULL,
  clustList = NULL,
  linkage = NULL,
  oneoff = NULL,
  stabThresh = NULL
)

Arguments

K2res

A K2 class object.

nFeats

'sqrt' or a numeric value <= number of features to subset for each partition.

featMetric

Character. Metric to use to assign gene-level variance/signal score.

  • F: F-statistic from evaluating differences in means across cohort

  • mad: Median absolute deviation

  • sd: Standard deviation

  • Sn: Robust scale estimator

recalcDataMatrix

Logical. Recalculate dataMatrix for each partion? Default is TRUE.

nBoots

nBoots A value of the number of bootstraps to run at each partition. Default is 500.

clustFunc

Character. Wrapper function to be used in recursive partitioning.

  • cKmeansDownsampleSqrt: Perform constrained K-means clustering after subsampling each cohort by the square root of the number of observations

  • cKmeansDownsampleSmallest: Perform constrained K-means clustering after subsampling each cohort by the size of the smallest cohort

  • hclustWrapper: Perform hierarchical clustering

useCors

Numeric. Number of cores to use for parallelizable processes.

clustList

Optional named list of parameters to use with clustFunc.

  • cKmeansDownsampleSqrt:

    • maxIter: The maximum number of iterations to use with lcvqe()

  • cKmeansDownsampleSmallest:

    • maxIter: The maximum number of iterations to use with lcvqe()

  • hclustWrapper:

    • aggMethod: One of the hierarchichal methods specified by hclust() function

    • distMetric: One of the distance metrics specified by dist() function

linkage

Character. Linkage criteria for splitting cosine matrix ('method' in hclust). 'average' by default.

oneoff

Logical. Allow 1 observation partition groups? Default is TRUE.

stabThresh

Numeric. A value between 0 and 1 indicatingThreshold for ending clustering.

Value

An object of class K2.

References

\insertRef

reed_2020K2Taxonomer


montilab/K2Taxonomer documentation built on April 5, 2025, 3:58 a.m.