Skip to content

Commit

Permalink
Update the palette_list
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao-njmu committed Nov 25, 2023
1 parent 67c8cd0 commit 3a8c86a
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 114 deletions.
177 changes: 111 additions & 66 deletions R/SCP-plot.R

Large diffs are not rendered by default.

23 changes: 16 additions & 7 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,29 @@ NULL
#' ocean_palettes <- pals:::syspals[ocean_names]
#' dichromat_palettes <- dichromat::colorschemes
#' jcolors_names <- paste0("jcolors-", c("default", "pal2", "pal3", "pal4", "pal5", "pal6", "pal7", "pal8", "pal9", "pal10", "pal11", "pal12", "rainbow"))
#' custom_names <- c("jet", "simspec", "GdRd")
#' custom_palettes <- list(
#' oompaBase::jetColors(N = 100),
#' c("#c22b86", "#f769a1", "#fcc5c1", "#253777", "#1d92c0", "#9ec9e1", "#015b33", "#42aa5e", "#d9f0a2", "#E66F00", "#f18c28", "#FFBB61"),
#' c("gold", "red3")
#' "jet" = oompaBase::jetColors(N = 100),
#' "simspec" = c("#c22b86", "#f769a1", "#fcc5c1", "#253777", "#1d92c0", "#9ec9e1", "#015b33", "#42aa5e", "#d9f0a2", "#E66F00", "#f18c28", "#FFBB61"),
#' "GdRd" = c("gold", "red3"),
#' "mGast" = c(
#' "Epiblast" = "#635547", "Primitive Streak" = "#DABE99", "Caudal epiblast" = "#9e6762", "PGC" = "#FACB12",
#' "Anterior Primitive Streak" = "#c19f70", "Notochord" = "#0F4A9C", "Def. endoderm" = "#F397C0", "Gut" = "#EF5A9D",
#' "Nascent mesoderm" = "#C594BF", "Mixed mesoderm" = "#DFCDE4", "Intermediate mesoderm" = "#139992", "Caudal Mesoderm" = "#3F84AA",
#' "Paraxial mesoderm" = "#8DB5CE", "Somitic mesoderm" = "#005579", "Pharyngeal mesoderm" = "#C9EBFB", "Cardiomyocytes" = "#B51D8D",
#' "Allantois" = "#532C8A", "ExE mesoderm" = "#8870ad", "Mesenchyme" = "#cc7818", "Haematoendothelial progenitors" = "#FBBE92",
#' "Endothelium" = "#ff891c", "Blood progenitors 1" = "#f9decf", "Blood progenitors 2" = "#c9a997", "Erythroid1" = "#C72228",
#' "Erythroid2" = "#f79083", "Erythroid3" = "#EF4E22", "NMP" = "#8EC792", "Rostral neurectoderm" = "#65A83E",
#' "Caudal neurectoderm" = "#354E23", "Neural crest" = "#C3C388", "Forebrain/Midbrain/Hindbrain" = "#647a4f", "Spinal cord" = "#CDE088",
#' "Surface ectoderm" = "#f7f79e", "Visceral endoderm" = "#F6BFCB", "ExE endoderm" = "#7F6874", "ExE ectoderm" = "#989898", "Parietal endoderm" = "#1A1A1A"
#' )
#' )
#' names(custom_palettes) <- custom_names
#'
#' palette_list <- list()
#' all_colors <- c(
#' rownames(brewer.pal.info), names(ggsci_db), rownames(redmonder.pal.info),
#' rownames(metacartocolors), names(nord_palettes), names(viridis_palettes),
#' ocean_names, names(dichromat_palettes), jcolors_names,
#' custom_names
#' names(custom_palettes)
#' )
#' for (pal in all_colors) {
#' if (!pal %in% all_colors) {
Expand Down Expand Up @@ -238,7 +247,7 @@ NULL
#' } else {
#' attr(palcolor, "type") <- "discrete"
#' }
#' } else if (pal %in% custom_names) {
#' } else if (pal %in% names(custom_palettes)) {
#' palcolor <- custom_palettes[[pal]]
#' if (pal %in% c("jet")) {
#' attr(palcolor, "type") <- "continuous"
Expand Down
Binary file modified data/palette_list.rda
Binary file not shown.
24 changes: 16 additions & 8 deletions man/CellCorHeatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/DynamicHeatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/FeatureHeatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/FeatureStatPlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/GroupHeatmap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/adjcolors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/blendcolors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions man/palette_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions man/palette_scp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 10 additions & 11 deletions man/show_palettes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a8c86a

Please sign in to comment.