addTBsignature: Introduce a new signature into the TBSignatureProfiler.

View source: R/addTBsignature.R

addTBsignatureR Documentation

Introduce a new signature into the TBSignatureProfiler.

Description

This function allows users to integrate new signatures into the TBSP with a function that updates the TBsignatures, TBcommon, sigAnnotData and common_sigAnnotData objects. Users that wish to use this function should do so with the downloaded package as a working directory, and not as a casual package function. This function does not complete all required updates to the package for a signature to be full added; users should check the vignette "Submitting Signatures to the TBSP Package" on the TBSP website for a walkthrough of this complete process. Also note that this function only adds one signature at a time, and must me run multiple times to add subsequent signatures.

Usage

addTBsignature(
  sigsymbols,
  authname,
  signame_common = NULL,
  sigtype,
  tissuetype,
  saveobjs = FALSE,
  views = TRUE
)

Arguments

sigsymbols

a character vector of the gene symbols that compose the signature to be added. Required.

authname

a character string containing the last name of the primary author of the publication where the signature was first identified. If spaces are present, omit them, and use proper capitalization. Required.

signame_common

a character string of the alternate name of the signature given by the publication, if it exists. If NULL, no assigned name is assumed to exist. Default is null.

sigtype

a character string that gives the context that the signature was developed under. Most commonly, it will distinguish TB from LTBI ("Disease"), TB from some combination of other diseases and possibly LTBI ("Disease/Other Diseases"), TB from Human Immunodeficiency Virus ("Disease/HIV"), TB from pneumonia ("Disease/Pneumonia"), or identify risk of progression to TB ("risk"), risk of TB treatment failure ("failure"), or classify treatment responses (i.e., failures from cures, "response"). Required.

tissuetype

a character string that denotes whether the signature was developed using samples of either whole blood/paxgene ("whole blood") or peripheral blood mononuclear cells ("PBMC"). Due to the manipulation of cells inherently required to obtain PBMCs, many scientists prefer to use only whole blood samples for analysis. Accepts "whole blood", "PBMC" or "mixed". Required.

saveobjs

logical. If TRUE, the contents of the data file (TBsignatures, TBcommon, sigAnnotData, common_sigAnnotData) will be overwritten and updated to include the new signature. If FALSE, no files will be overwritten, but you can check function output for errors before writing RDS objects by setting views = TRUE. Default is saveobjs = FALSE.

views

logical. If TRUE, all objects will be sent to a data view in a new window to check for errors. Default is TRUE.

Value

Either data objects TBsignatures, TBcommon, sigAnnotData, and common_sigAnnotData will be updated with the new signature and overwritten if saveobjs = FALSE, or no output will be produced except errors and messages for checking that the function runs correctly given the inputs.

Examples

# Mock example signature
TBSignatureProfiler:::addTBsignature(sigsymbols = c("GBP5", "BATF2", "GZMA"),
                            authname = "Odom",
                            signame_common = NULL,
                            sigtype = "Disease/HIV",
                            tissuetype = "PBMC",
                            saveobjs = FALSE,
                            views = FALSE)

dfjenkins3/TBSignatureProfiler documentation built on Oct. 26, 2024, 1:29 a.m.