An R package to store and interact with gene signatures for single-cell analysis

Get the database and its accessor functions:
remotes::install_github("carmonalab/SignatuR")
library(SignatuR)
data(SignatuR)
The DB is structured as a data.tree object, with signatures organized by species and category. Gene lists are stored in the "Signature" attribute, comments and references for the signature are stored in the "Reference" attribute.
Several functions for easy interaction with the data structure have been implemented. See some examples below:
data(SignatuR)
SignatuR
print(SignatuR, "Reference","Signature")
DiagrammeR)library(DiagrammeR)
plot(SignatuR)
s <- GetSignature(SignatuR$Mm$Programs$HeatShock)
ss <- GetSignature(SignatuR$Mm$Programs)
SignatuR <- AddSignature(SignatuR,
node=SignatuR$Mm$Cell_types,
name="T_cell",
reference="A simple T cell signature",
signature=c("Cd2","Cd3d","Cd3e"))
SignatuR <- AddSignature(SignatuR,
node=SignatuR$Mm$Cell_types,
name="T_cell",
reference="A modified T cell signature",
signature=c("Cd2","Cd3d","Cd3e","Cd3g"),
overwrite=T)
SignatuR <- AddNode(SignatuR,
parent_node=SignatuR$Hs,
name="New_category")
RemoveSignature(SignatuR$Hs$Compartments$TCR)
SignatuR.copy <- data.tree::Clone(SignatuR)
SaveSignatuR(SignatuR, file="mySignatuR.csv")
mySignatuR <- LoadSignatuR("mySignatuR.csv")
usethis::use_data(SignatuR, overwrite = TRUE)
