View source: R/params_functions.R View source: R/Package-Code5-Compiled.R
update_annot_cols | R Documentation |
Update sample annotations stored in annotations parameter of the params list object. See set_annotations for intially setting the annotations.
Update colors corresponding to both sample and gene annotations stored in the annotations and annotations.genes parameters of the params list object that are passed to a variety of functions in the dataVisEasy package. See set_annot_cols for intially setting the annotations.
update_annot_cols(annotation, values.list)
annotation |
title of annotation to be updated or added. If already found in the names of the annot_cols list, the previous values for that annotation will be replaced with the supplied values here. If not found in the names of the annot_cols list, values will be added as a new item under the name indicated. |
values.list |
values corresponding to the annotation to be updated or added. |
~~Alison Moss~~
to set annot_cols, see set_annot_cols
#genemod.cols <- brewer.pal(7,"Set3"); names(genemod.cols) <- LETTERS[1:7]
#update_annot_cols("GeneMods",c(genemod.cols))
##initiate parameters and annotations
initiate_params()
set_annotations(RAGP_annots)
##set up list for color annotations and set colors
annot_cols <- list('Connectivity'=c("SAN-Projecting"="blue","Non-SAN-Projecting"="violet",
"No Info Available"="grey"),
'Animal'=c("PR1534"="#0571b0","PR1643"="#ca0020","PR1705"="#92c5de",
"PR1729"="#f4a582"))
set_annot_cols(annot_cols)
scatterGenes(RAGP_norm, "Th","Chat", color.by = "State")
##add specified color annotations to already existing list
state.cols <- RColorBrewer::brewer.pal(6,"Set1"); names(state.cols) <- LETTERS[1:6]
update_annot_cols("State", state.cols)
scatterGenes(RAGP_norm, "Th","Chat", color.by = "State")
##update and overwrite previous colors
state.cols <-c("red","orange","yellow","green","purple","violet");names(state.cols) <- LETTERS[1:6]
update_annot_cols("State", state.cols)
scatterGenes(RAGP_norm, "Th","Chat", color.by = "State")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.