View source: R/cluster_refinement.R
expand_clusters | R Documentation |
Assign unclustered isoforms based on their correlation with the average expression profile of previously-generated clusters.
expand_clusters(
data,
isoform_col = NULL,
id_table,
cluster_list,
unclustered,
percentile_no = 10,
force_expand = TRUE,
expand_threshold = NULL,
allow_negative_cors = TRUE,
method = c("percentile", "pearson", "spearman", "rho", "zi_kendall")
)
data |
A data.frame or tibble object including isoforms as rows and cells as columns. Isoform IDs can be included as row names (data.frame) or as an additional column (tibble). |
isoform_col |
When a tibble is provided in |
id_table |
A data frame including two columns named |
cluster_list |
A list of character vectors, each containing the identifiers of the isoforms in a cluster. |
unclustered |
A character vector containing the identifiers of unclustered isoforms. |
percentile_no |
Integer indicating the number of percentiles that will
be used to summarized cell type expression via |
force_expand |
Logical. When |
expand_threshold |
A numeric value defining the minimum correlation required to assign an unclustered isoform to a cluster. |
method |
Character indicating a co-expression method to use for merging
similar clusters. Should be one of |
allow_negative_cors. |
Logical. If set to |
Correlation-based cluster expansion first requires cluster
metatranscripts to be calculated. A cluster's metatranscript
is calculated as the mean of the
percentile-summarized
expression of all of the isoforms in that cluster. Next, co-expression values
between the metatranscripts and the unclustered isoforms are computed using
the similarity metric specified in method
.
Available co-expression metrics (selected via the method
) include:
percentile
: percentile correlations computed using
percentile_cor
.
pearson
: Pearson correlation computed using
cor
.
spearman
: Spearman correlation computed using
cor
.
zi_kendall
: zero-inflated Kendall correlation computed
using the dismay
function.
rho
: rho proportionality metric computed using the
dismay
function.
Cluster expansion can be forced or threshold-based, depending on the values
provided to force_expansion
(i.e. TRUE
or FALSE
,
respectively). If forced, isoforms will be assigned to a cluster if its
metatranscript is the one yielding the highest co-expression with the isoform's
expression, regardless of the exact co-expression metric value. Conversely,
when threshold-based, only isoforms showing co-expression above the
user-defined threshold (expand_threshold
) with at least one
metatranscript will be assigned to clusters. In this case, the maximally-
correlated cluster is selected as the best match if there are several
candidate clusters with above-threshold co-expression values.
A list containing expanded clusters, where each element will include
the identifiers of the isoforms assigned ot each cluster.
If force_expand = FALSE
, the first element of the list will contain
the identifiers of isoforms that remained unassigned.
Skinnider2019acorde
\insertRefVenables2002acorde
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.