Description Usage Arguments Details Value See Also Examples
View source: R/scMethrix_clustering.R
Get the pair-wise distance matrix for an assay
1 2 3 4 5 6 7 | get_distance_matrix(
scm,
assay = "score",
type = c("pearson", "spearman", "kendall", "euclidean", "manhattan", "canberra",
"binary", "minkowski"),
verbose = TRUE
)
|
scm |
scMethrix; Input |
assay |
string; The assay to use. Default is 'score' |
type |
string; The type of distance metric to use. Available options are "pearson", "spearman", "tau", "euclidean", "manhattan", "canberra", "binary", "minkowski". An aribitrary distance function can also be used, so long as the input takes just the specified matrix. |
verbose |
boolean; flag to output messages or not |
Utilizes mainly the bioDist package to determine various distance metrics to be used for later clustering.
matrix; the distance matrix
https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/dist
https://www.bioconductor.org/packages//2.7/bioc/html/bioDist.html
1 2 3 4 5 6 7 8 | data('scMethrix_data')
scMethrix_data <- impute_regions(scMethrix_data)
get_distance_matrix(scMethrix_data,assay = "impute")
# For an arbitrary distance function
library(bioDist)
fun <- bioDist::spearman.dist
get_distance_matrix(scMethrix_data,assay = "impute",type = bioDist::spearman.dist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.