fheatmap | R Documentation |
This just wraps the sparrow::mgheatmap2()
function, but can accept a
facile_frame
fheatmap(
x,
features = NULL,
assay_name = NULL,
gdb = NULL,
rename_rows = NULL,
...,
colors = NULL
)
colors |
a list of named color vectors. Names should correspond to columns in row or column annotation dataframes(?) |
TODO: support batch correction over data retrieved from x
# the seed matters, because some samples don't have all assay data
set.seed(0xBEEF)
set.seed(0xBEE)
afds <- FacileData::an_fds()
asamples <- FacileData::samples(afds) |>
FacileData::with_sample_covariates() |>
dplyr::filter(cell_abbrev %in% c("IMM", "PT")) |>
dplyr::sample_n(10)
genes <- dplyr::tibble(
name = c(
"AOX1", "DPEP1", "CDH6", "NAT8", # PT
"S100A8", "JCHAIN", "CCL4", "FCER1G"), # IMM
class = rep(c("PT", "IMM"), each = 4)) |>
dplyr::inner_join(FacileData::features(afds), by = "name")
fheatmap(
asamples,
genes,
bottom_annotation = c("cell_abbrev", "condition"),
ba_annotation_name_gp = grid::gpar(fontsize = 16),
colors = list(cell_abbrev = c(IMM = "firebrick", PT = "navy")),
column_split = asamples$cell_abbrev
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.