spRing: Execute the spRing algorithm

Description Usage Arguments Value Examples

Description

spRing takes a matrix of samples X features and computes a per-sample distance vector before selecting the k nearest neighbors. This is done iteratively in Rcpp to minimize the memory footprint while optimizing speed. Force directed layout is implemented from igraphs layout_with_drl function. If either/both knngraph or igraph is TRUE, this function will return an S3 object (list) with the coordinates and either/both of these objects. Otherwise, a two dimensional vector specifying the coordinates will be returned.

Usage

1
2
3
4
5
spRing(x, k = 10, method = "pearson", knngraph = FALSE, igraph = FALSE)

## S4 method for signature 'ANY,numeric'
spRing(x, k = 10, method = "pearson",
  knngraph = FALSE, igraph = FALSE)

Arguments

x

Data matrix

k

= 10

method

= "pearson" The distance metric for the data.

knngraph

= FALSE Return knn graph generated by the data?

igraph

= FALSE Return igraph network associated with knn graph?

Value

One or more outputs. See above

Examples

1
2
3
x <- matrix(rnorm(100), nrow = 20) # 20 samples
coords <- spRing(x, k = 2, method = "euclidean")
# plot(coords)

caleblareau/scTools documentation built on May 13, 2019, 11:01 a.m.