identify_regions: Identify regions of interest

Description Usage Arguments Value Examples

View source: R/identify-regions.R

Description

Identifies regions of interest (the tips of branches, or branching regions) based on comparing the GAP scores#'acquired by running local clustering by 'kbranches.local'. Performs local filtering to reduce noise in the extracted labels.

Usage

1
2
3
4
5
identify_regions(input_dat, mode = "tip", tip_mode = "3",
  gap_scores = NULL, smoothing_region = NULL,
  smoothing_region_thresh = NULL, Dist, dotsize1 = 7, dotsize2 = 7,
  nclust = NULL, nclust.max = 5, B.max = 100, SE.factor = 2.58,
  repeats = 20, gapm_tips = F)

Arguments

input_dat:

data frame of input data with rows=samles and cols=dimensions.

mode:

=c('tip','branch') find either the tips or the branching regions

tip_mode:

=c('2','3','both') find the tips using the GAP statistic of 1 vs 2,3 or both

gap_scores:

list, output of function 'kbranches.local' for the same 'input_dat'

smoothing_region:

number of neighbours in to consider for label filtering

smoothing_region_thresh:

minimum number of thresholds with same label in the neighbourhood required for the sample to keep it's label

Dist:

matrix of sample to sample distances

dotsize1:

size of points of class1 (red), used when plotting in 3D

dotsize2:

size of points of class2 (green), used when plotting in 3D

nclust:

number of clusters (tips/branching regions). If left NULL, will be estimated.

nclust.max:

maximum possible number of clusters to consider. Only used if nclust==NULL

B.max:

maximum number of bootstrap datasets used to calculate the GAP statistic to estimate nclust. Only used if nclust==NULL

SE.factor:

used to estimate nclust, argument to cluster::maxSE. Only used if nclust==NULL

repeats:

number of times to estimate nclust (for stability - the nclust most frequently considered 'best' is finally extracted). Only used if nclust==NULL

Value

a list with elements:

Examples

1
#see example of kbranches.local

theislab/kbranches documentation built on Feb. 27, 2020, 11:01 a.m.