knnOutliers: Find outliers in terms of their distance in the k-nearest...

Description Usage Arguments Details Value

View source: R/knn.R

Description

Plots density of cells, given their distance in gene expression to their nearest and nth nearest neighbors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
knnOutliers(
  object,
  nn.1 = 1,
  nn.2 = 20,
  x.max,
  slope.r,
  int.r,
  slope.b,
  int.b,
  title = "",
  invert = F
)

Arguments

object

An URD object

nn.1

(Numeric) Nearest neighbor to compare on x-axis

nn.2

(Numeric) Nearest neighbor to compare on y-axis

x.max

(Numeric) Maximum distance to nearest neighbor nn.1 (green line)

slope.r

(Numeric) Slope of red line

int.r

(Numeric) y-intercept of red line

slope.b

(Numeric) Slope of blue line

int.b

(Numeric) y-intercept of blue line

title

(Character) Title of the plot

Details

Since the diffusion map is calcated on a k-nearest neighbor graph in gene expression space, cells that have unusual distances to their nearest neighbors in a k-nearest neighbor graph often cause poor resulting diffusion maps. Cropping cells based on their distance to their nearest neighbor, and cropping cells that have unusually large distances to an nth nearest neighbor, given the distance to their nearest neighbor, generally produces better results.

Value

Character vector of outlier cells (or non-outliers, if invert=T)


farrellja/URD documentation built on June 17, 2020, 4:48 a.m.