Return a mask matrix with differential cluster accessibility (DCA)
Source:R/plot-region.R
mct_diff_access_on_hc.Rd
This function detects differential cluster accessibility (DCA) for each sub-tree of a given hclust
object with hierarchical clustering of the metacells.
For each coordinate (column) in the matrix, the function computes the log fold change between the subtree and the rest of the tree, and returns a mask matrix indicating whether the fold change is above or below the threshold(s).
In order to avoid very long DCAs, the functions limits the size of a peak/trough to a fraction of all the metacells (sz_frac_for_peak
).
Usage
mct_diff_access_on_hc(
mat,
hc,
sz_frac_for_peak = 0.25,
u_reg = 4,
peak_lf_thresh1 = 1.2,
peak_lf_thresh2 = 2,
trough_lf_thresh1 = -1,
trough_lf_thresh2 = -2
)
Arguments
- mat
a matrix where rows are coordinates and columns are metacells
- hc
an hclust object with the order of the metacells
- sz_frac_for_peak
maximal fraction of metacells in a peak or trough. Default is 0.25.
- u_reg
regularization factor
- peak_lf_thresh1, peak_lf_thresh2, trough_lf_thresh1, trough_lf_thresh2
thresholds for the log fold change of the peaks and troughs