Skip to contents

This function extracts a subset of Signature objects from the internal Signature database based on a vector of provided IDs. It validates the presence of each ID, checks for consistency in detector names across selected Signatures, and returns a matrix of Signature values.

Usage

getSigMtx(ids, Sig_list = NULL)

Arguments

ids

A character vector of Signature IDs to retrieve.

Sig_list

Users may provide Signature list themselves, which contains signature items generated with ExtractSig function.

Value

A numeric matrix of Signature values if detectors are consistent across selected Signatures. Otherwise, the function returns a list of Signature objects.

Details

The function reads the Signature list from the internal package path: system.file("sig", "Sig_list.rds", package = "USERM"). It searches for each ID in the Signature list and throws an error if any ID is not found.

If all selected Signatures share the same set of detectors, a numeric matrix is returned where rows represent detectors and columns represent Signature IDs. If detector sets differ, a warning is issued and the original Signature list is returned instead.

Examples

if (FALSE) { # \dontrun{
  ids <- c("SCC_Bead_CD4_NFR700", "SCC_Bead_CD3_BV510",  "SCC_Bead_CD2_FITC")
  sig_matrix <- getSigMtx(ids)
  print(sig_matrix)
} # }