buildKNN | R Documentation |
Create kNN graph using the PCA components and cell-cell similarities using the jaccard or invlog methods. Write graph to file.
buildKNN( object, assay.type = "RNA", k = 5, column.ann, num.pcs = 20, sim.type = "jaccard", filename = "graph_clusters.gml" ) ## S4 method for signature 'CellRouter' buildKNN( object, assay.type = "RNA", k = 5, column.ann, num.pcs = 20, sim.type = "jaccard", filename = "graph_clusters.gml" )
object |
CellRouter object. |
assay.type |
character; the type of data to use. |
k |
numeric; number of nearest neighbors to build a k-nearest neighbors graph for trajectory reconstruction. |
column.ann |
character; column in the metadata table specifying the transitions to be identified. For example, if 'population' is provided, transitions will be identified between clusters previously identified. However, sorted cell populations or customized states can also be used. Check our tutorials for detailed examples. |
num.pcs |
numeric; number of principal components that will define the space from where the kNN graph is identified. For example, if num.pcs = 10, the kNN graph will be created from a 10-dimensional PCA space. |
sim.type |
character; updates the kNN graph to encode cell-cell similarities using the jaccard or invlog methods. |
filename |
character; name of gml file containing the kNN graph. |
CellRouter object with the graph, ndata, and sampTab slots updated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.