get_distances_from_landmarks: Calculate (and filter) disatances between cluster and...

Description Usage Arguments Value

View source: R/scaffold.R

Description

This function calculates the cosine similarity between the cluster and landmark nodes, and then filters out the resulting matrix to include only the top-scoring edges. The result of this function can be used as an adjacency matrix for graph construction

Usage

1
get_distances_from_landmarks(m, tab, col.names, q.thresh, min.similarity = 0.5)

Arguments

m

A data.frame containing expression values for the cluster nodes

tab

A data.frame containing expression values for the landmark nodes

col.names

A vector of column names to be used for the computation

q.thresh

The quantile probability to be used for filtering edges. The algorithm will calculate a weight threshold based on this quantile of the weight distribution

min.similarity

The minimum similarity value to be used for thresholding edges. Irrespective of the results of the quantile computation, the actual threshold used will never be less than this value

Value

Returns a matrix with each row corresponding to a cluster node, and each column corresponding to the similarity between the cluster node and the respective landmark node. This matrix can be directly used as an adjacency matrix for graph construction


ParkerICI/scgraphs documentation built on April 30, 2021, 1:10 p.m.