Skip to content

A database of useful gene signatures for single-cell analysis

Notifications You must be signed in to change notification settings

carmonalab/SignatuR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SignatuR

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

Install

Get the database and its accessor functions:

remotes::install_github("carmonalab/SignatuR")
library(SignatuR)

Data format

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:

  • See database structure
SignatuR
  • See database with annotations
print(SignatuR, "Reference","Signature")
  • Plot database structure (requires installing DiagrammeR)
library(DiagrammeR)
plot(SignatuR)
  • Extract a specific signature
s <- GetSignature(SignatuR$Mm$Programs$HeatShock)
  • Extract all signatures below a given node
ss <- GetSignature(SignatuR$Mm$Programs)
  • Add a new signature to the DB (e.g. to "Cell_types" node)
SignatuR <- AddSignature(SignatuR,
	node=SignatuR$Mm$Cell_types,
	name="T_cell",
	reference="A simple T cell signature",
	signature=c("Cd2","Cd3d","Cd3e"))
  • Modify and existing signature (turn on 'overwrite' flag)
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)
  • Add a new node to the DB
SignatuR <- AddNode(SignatuR,
  parent_node=SignatuR$Hs,
  name="New_category")
  • Remove a signature or a node from the DB
RemoveSignature(SignatuR$Hs$Compartments$TCR)
  • Make a clone of the DB (allows you to edit without breaking the DB)
SignatuR.copy <- data.tree::Clone(SignatuR)
  • Save a local copy of your modified SignatuR DB
SaveSignatuR(SignatuR, file="mySignatuR.csv")
  • Load a local copy of SignatuR from disk
mySignatuR <- LoadSignatuR("mySignatuR.csv")
  • Save updated database (for package developers)
usethis::use_data(SignatuR, overwrite = TRUE)

Use examples

About

A database of useful gene signatures for single-cell analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages