Extract a normalized signature from a single-stained control (SCC)
Source:R/ExtractSig.R
ExtractSig.RdThis function computes a normalized signature vector by comparing positive and negative control data
for a set of specified detector channels. It applies a summary method (e.g., median, mean)
to each column in the positive and negative data frames, calculates the difference, and normalizes the result.
Usage
ExtractSig(
df_pos,
df_neg,
cols,
method,
PrimaryName,
SecondaryName,
id,
instrument,
Source,
Note = NA
)Arguments
- df_pos
A data frame containing positive control signal data (cells x detectors).
- df_neg
A data frame containing negative control signal data (cells x detectors).
- cols
A character vector specifying the column names (detector channels) to be used for signature extraction.
- method
A function used to summarize each column (e.g.,
median,mean).- PrimaryName
A character string specifying the primary name of the fluorophore.
- SecondaryName
A character string specifying the secondary name of the fluorophore or marker.
- id
A character string used to identify the signature object.
- instrument
A character string used to specify the instrument used to generate the raw data, e.g. Aurora5L, Xenith.
- Source
A character string used to specify the source the raw data, e.g. name of researcher or institution.
- Note
A character string used to specify any additional information related to the fluorophore.
Value
A list containing:
- id
The identifier string.
- PrimaryName
The primary name of the fluorophore.
- SecondaryName
The secondary name of the fluorophore or marker.
- Signature
A normalized numeric vector representing the extracted signature.
Examples
if (FALSE) { # \dontrun{
df_pos <- data.frame(D1 = rnorm(100, 100), D2 = rnorm(100, 200))
df_neg <- data.frame(D1 = rnorm(100, 10), D2 = rnorm(100, 20))
sig <- ExtractSig(df_pos, df_neg, cols = c("D1", "D2"), method = mean,
PrimaryName = "FITC", SecondaryName = "CD3", id = "FITC_CD3")
} # }