neuprint_cosine_plot | R Documentation |
Plot cosine clustering of neuprint/hemibrain neurons
neuprint_cosine_plot(
x,
partners = c("inputs", "outputs"),
threshold = 5,
method = c("ward.D", "single", "complete", "average", "mcquitty", "median", "centroid",
"ward.D2"),
group = FALSE,
labRow = "{type}",
heatmap = FALSE,
interactive = FALSE,
nas = c("zero", "drop"),
conn = NULL,
...
)
x |
Query ids. May including searches in the style of
|
partners |
Whether to cluster based on connections to input or output partner neurons (default both). |
threshold |
An integer threshold (connections >= this will be returned) |
method |
The cluster method to use (see |
group |
Whether to group by cell |
labRow |
A vector defining the row labels. If it is a character vector
length 1 containing any curly braces it will be interpreted as a
|
heatmap |
A logical indicating whether or not to plot the heatmap
OR a function to plot the heatmap whose argument names are
compatible with |
interactive |
Whether to plot an interactive heatmap (allowing zooming and id selection). See details. |
nas |
What to do with entries that have NAs. Default is to set them to 0 similarity. |
conn |
optional, a neuprintr connection object, which also specifies the
neuPrint server. If NULL, the defaults set in your
|
... |
Additional arguments passed to |
Note that when interactive=TRUE
you must have external
packages including InteractiveComplexHeatmap
installed with the
coconat
package. If you are using Rstudio, we recommend using an
external browser (e.g. Chrome) rather than the built-in browser, especially
for larger heatmaps.
The result of heatmap
invisibly including the row and
column dendrograms or, when heatmap=FALSE
, a
stats::hclust
object.
neuprint_cosine_matrix
, heatmap
,
hclust
neuprint_cosine_plot("/DA[1-3].*PN", partners='in')
## Not run:
# Considering all partners
neuprint_cosine_matrix("/lLN2.+", partners='in') %>% neuprint_cosine_plot()
# excluding the PN partners from the cosine distance score
neuprint_cosine_matrix("/lLN2.+", !grepl("PN",type), partners='in') %>% neuprint_cosine_plot()
# just use PN partners for cosine distance score
neuprint_cosine_matrix("/lLN2.+", grepl("PN",type), partners='in') %>% neuprint_cosine_plot()
# interactive heatmap allowing zooming and id selection
neuprint_cosine_plot("/lLN2.+", partners='out', interactive=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.