BuildTopicSNN: Build SNN graph

Description Usage Arguments Value

View source: R/SNN.R

Description

This function is a modified version of the BuildSNN function in the single cell genomics tool Seurat (Version: 2.1.0, date: 2017-10-11).

Usage

1
2
3
4
BuildTopicSNN(object, k.param = 30, k.scale = 25, plot.SNN = FALSE,
  prune.SNN = 1/15, print.output = TRUE, clusters = NULL, seed = 0,
  cluster.method = "SNN", perplexity = 15, color.by.sample = T,
  tsne = NULL, layout = NULL, algorithm = 1, ...)

Arguments

object

Topic matrix obtained with compute.lda() from cellTree package

k.param

Defines k for the k-nearest neighbor algorithm

k.scale

Granularity option for k.param

plot.SNN

Plot the SNN graph

prune.SNN

Sets the cutoff for acceptable Jaccard distances when computing the neighborhood overlap for the SNN construction. Any edges with values less than or equal to this will be set to 0 and removed from the SNN graph. Essentially sets the strigency of pruning (0 — no pruning, 1 — prune everything).

print.output

Whether or not to print output to the console

clusters

Clusters used to color vertices in SNN ntwork graph

seed

Set random seed for t-SNE algorithm

cluster.method

Chose method to use for clustering. "topic" will run clusterST() and cluster features based on topic porportion using hierarchical clustering with euclidean distances and ward.D2. Clusters are chosen using the unsupervised cutreeDynamic function from dynamicTreeCut package. "SNN" will run a network graph based algorithm using methods from the Seurat package.

perplexity

Set perplexity for tsne if plot.SNN is TRUE

color.by.sample

Color vertices by sample in network graph

tsne

Two column matrix with tsne results, alternatively run tsne using preset parameters

layout

Set custom layout of vertices in network graph. Will override t-SNE results

algorithm

Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm)

...

Parameters passed to RunModularityClusteringspaceST() function used for clustering

Value

SNN matrix


ludvigla/spaceST documentation built on May 29, 2019, 3:43 a.m.