Rphenograph: RphenoGraph clustering

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Rphenograph.R

Description

R implementation of the phenograph algorithm

Usage

1
Rphenograph(data, k = 30)

Arguments

data

Input data matrix.

k

Number of nearest neighbours, default is 30.

Details

A simple R implementation of the phenograph [PhenoGraph](http://www.cell.com/cell/abstract/S0092-8674(15)00637-6) algorithm, which is a clustering method designed for high-dimensional single-cell data analysis. It works by creating a graph ("network") representing phenotypic similarities between cells by calculating the Jaccard coefficient between nearest-neighbor sets, and then identifying communities using the well known [Louvain method](https://sites.google.com/site/findcommunities/) in this graph.

Value

a communities object, the operations of this class contains:

print

returns the communities object itself, invisibly.

length

returns an integer scalar.

sizes

returns a numeric vector.

membership

returns a numeric vector, one number for each vertex in the graph that was the input of the community detection.

modularity

returns a numeric scalar.

algorithm

returns a character scalar.

crossing

returns a logical vector.

is_hierarchical

returns a logical scalar.

merges

returns a two-column numeric matrix.

cut_at

returns a numeric vector, the membership vector of the vertices.

as.dendrogram

returns a dendrogram object.

show_trace

returns a character vector.

code_len

returns a numeric scalar for communities found with the InfoMAP method and NULL for other methods.

plot

for communities objects returns NULL, invisibly.

Author(s)

Chen Hao

References

Jacob H. Levine and et.al. Data-Driven Phenotypic Dissection of AML Reveals Progenitor-like Cells that Correlate with Prognosis. Cell, 2015.

Examples

1
2
3
iris_unique <- unique(iris) # Remove duplicates
data <- as.matrix(iris_unique[,1:4])
Rphenograph_out <- Rphenograph(data, k = 45)

Example output

Loading required package: ggplot2
Loading required package: plyr
Warning message:
no DISPLAY variable so Tk is not available 
Run Rphenograph starts:
  -Input data of 149 rows and 4 columns
  -k is set to 45
  Finding nearest neighbors...DONE ~ 0.004 s
  Compute jaccard coefficient between nearest-neighbor sets...DONE ~ 0.098 s
  Build undirected graph from the weighted links...DONE ~ 0.038 s
  Run louvain clustering on the graph ...DONE ~ 0.036 s
Run Rphenograph DONE, took a total of 0.175999999999999s.
  Return a community class
  -Modularity value: 0.5639301 
  -Number of clusters: 3

cytofkit documentation built on Nov. 1, 2018, 3:50 a.m.