plot_sample {lineup2} | R Documentation |
Plot the distances for a given sample
Description
Plot the distances for a given sample, highlighting itself and the closest sample
Usage
plot_sample(
d,
sample,
dimension = c("row", "column"),
get_min = TRUE,
add_labels = TRUE,
...
)
Arguments
d |
A distance or similarity matrix |
sample |
Sample ID (in row or column names) |
dimension |
Whether to look at the row or column |
get_min |
If TRUE, get the minimum (for a distance matrix); if FALSE, get the maximum (for a similarity matrix) |
add_labels |
If TRUE, label the individual sample and the optimal sample |
... |
Passed to |
Value
None.
Examples
# align rows in the provided dataset, lineup2ex
aligned <- align_matrix_rows(lineup2ex$gastroc, lineup2ex$islet)
# find correlated columns
selected_genes <- (corr_betw_matrices(aligned[[1]], aligned[[2]], "paired") > 0.75)
# calculate correlation between rows
similarity <- corr_betw_matrices(t(lineup2ex$gastroc[,selected_genes]),
t(lineup2ex$islet[,selected_genes]), "all")
plot_sample(similarity, "Mouse3659", get_min=FALSE)
plot_sample(similarity, "Mouse3655", "column", get_min=FALSE)
[Package lineup2 version 0.6 Index]