Package 'SignatuR'

Title: Signatures for single-cell data analysis
Description: A database of useful signatures for single-cell data analysis. Query the existing signatures or use it to organize your own gene sets in a hierarchical structure.
Authors: Massimo Andreatta [aut, cre] (ORCID: <https://orcid.org/0000-0002-8036-2647>), Paul Gueguen [aut] (ORCID: <https://orcid.org/0000-0003-2930-6073>), Santiago Carmona [aut] (ORCID: <https://orcid.org/0000-0002-2495-0671>)
Maintainer: Massimo Andreatta <[email protected]>
License: GPL-3
Version: 0.3.0
Built: 2026-05-14 06:57:22 UTC
Source: https://github.com/carmonalab/SignatuR

Help Index


Add node to DB

Description

Add a new internal node to the DB. This generates a local, updated copy of the database.

Usage

AddNode(db, parent_node, name = "New_signature", reference = NA)

Arguments

db

The database object to be updated

parent_node

The parent node where the new node should be added

name

Name for the new node

reference

Optional text to describe the node

Value

An update database containing the new node

Examples

data(SignatuR)
SignatuR <- AddNode(SignatuR, parent_node=SignatuR$Hs, name="New_category")

Add signature to DB

Description

Add a new signature to the DB. This generates a local, updated copy of the database.

Usage

AddSignature(
  db,
  node,
  name = "New_signature",
  signature = NULL,
  reference = NA,
  overwrite = FALSE
)

Arguments

db

The database object to be updated

node

A database node where the new signature should be added

name

Signature name

signature

Gene signature, as a vector of genes

reference

A text describing source of the signature or other comments

overwrite

Whether to replace an already existing signature with the same name

Value

An update database containing the new signature

Examples

data(SignatuR)
SignatuR <- AddSignature(SignatuR, node=SignatuR$Mm$Cell_types,
    name="T_cell", reference="A simple T cell signature", signature=c("Cd2","Cd3d","Cd3e"))

Get signatures from DB

Description

Return one or more signatures from a specified database node. If an intermediate node is specified, all signatures below that node are returned as a list of signatures.

Usage

GetSignature(node)

Arguments

node

A database node, either internal or leaf

Value

A single signature or list of signatures

Examples

data(SignatuR)
# Single signature
GetSignature(SignatuR$Mm$Programs$HeatShock)
# Multiple signature from intermediate node
s <- GetSignature(SignatuR$Mm$Programs)
lapply(s, head)

Load SignatuR from local file

Description

Load a file storing a SignatuR object. See also the function SaveSignatuR for saving existing DB.

Usage

LoadSignatuR(file = "mySignatuR.csv")

Arguments

file

Source file (.csv, .rds or .rda)

Value

A SignatuR object

See Also

SaveSignatuR

Examples

data(SignatuR)
# Save DB
SaveSignatuR(SignatuR, file="mySignatuR.csv")
# Load it back
mySignatuR <- LoadSignatuR("mySignatuR.csv")

Remove signature from DB

Description

Remove a given signature or node from the database

Usage

RemoveSignature(node)

Arguments

node

A database node to be removed

Value

Nothing. The DB is modified in place.

Examples

data(SignatuR)
RemoveSignature(SignatuR$Hs$Compartments$TCR)

Save a local copy of SignatuR

Description

Store a modified copy of your SignatuR DB, in different formats. Saving to .csv allows editing of signatures in a text or spreadsheet program

Usage

SaveSignatuR(db, file = "mySignatuR.csv")

Arguments

db

The database object to be saved

file

Destination file (.csv, .rds or .rda)

See Also

LoadSignatuR

Examples

data(SignatuR)
# Save DB
SaveSignatuR(SignatuR, file="mySignatuR.csv")
# Load it back
mySignatuR <- LoadSignatuR("mySignatuR.csv")

A database of gene signatures for single-cell data analysis

Description

The DB is structured in a tree format, using the data.tree data type. See the examples below to browse and access this data type. print(SignatuR)

Usage

SignatuR

Format

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.

See database structure

SignatuR

See database with annotations

print(SignatuR, "Reference","Signature")

Plot database structure

library(DiagrammeR)
plot(SignatuR)

Extract a specific signature

GetSignature(SignatuR$Mm$Programs$HeatShock)

Extract all signatures below a given node

GetSignature(SignatuR$Mm$Programs)

Add a new signature to the DB

⁠SignatuR <- AddSignature(SignatuR, node=SignatuR$Mm$Cell_types,name="T_cell", reference="A simple T cell signature", signature=c("Cd2","Cd3d","Cd3e")⁠

Add a new node to the DB

SignatuR <- AddNode(SignatuR, parent_node=SignatuR$Hs, name="New_category")

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 developers)

usethis::use_data(SignatuR, overwrite = TRUE)