Description Usage Arguments Details Value See Also
Performs weighted smoothening of cms scores
1 | .smoothCms(knn, cms_raw, cell_names, k_min, k)
|
knn |
List with three elements. First "index" with indices of knn cells.
Second "distance" with distances to knn cells. Third a slot named by
|
cms_raw |
Matrix with raw cms scores for all cells specified in
|
cell_names |
Character vector with cell names corresponding to the
rownames of the list elements in |
k_min |
Numeric. Minimum number of knn to include. Default is NA (see Details). |
k |
Numeric. Number of k-nearest neighbours (knn) to use. |
Internal function to smooth cms scores. In a complete random setting cms scores are uniform distributed. To reduce the resulting random variance and enable visualization of local pattern cms scores can be smoothened assuming that within one region mixing is uniform. Generates smoothened cms scores using weigthed means of cms scores within the k-nearest neighbourhood. Reciprocal distances are used as weights.
matrix with two columns ("cms_smooth", "cms").
Other helper functions:
.cmsCell()
,
.defineSubspace()
,
.filterKnn()
,
.filterLocMin()
,
.ldfKnn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.