View source: R/standardization.R
get_zscore | R Documentation |
This function computes per-marker Z-scores based on the total signal intensity (R), which typically represents the sum of reference (X) and alternative (Y) allele signals. The Z-score measures how much each sample deviates from the mean intensity of that marker.
get_zscore(data = NULL, geno.pos = NULL)
data |
A data.frame containing signal intensity and ratio values with the following columns:
|
geno.pos |
A data.frame with marker genomic positions, containing the following columns:
|
The function also merges positional metadata from the 'geno.pos' input, adding chromosome and physical position for each marker.
A data.frame containing the following columns:
Marker ID.
Chromosome corresponding to the marker.
Genomic position (bp).
Sample ID.
Z-score computed per marker across all samples.
Markers with missing chromosome or position information are excluded from the final output.
data <- data.frame(
MarkerName = rep("m1", 5),
SampleName = paste0("S", 1:5),
X = c(100, 110, 90, 95, 85),
Y = c(200, 190, 210, 205, 215),
R = c(300, 300, 300, 300, 300),
ratio = c(0.67, 0.63, 0.70, 0.68, 0.72)
)
geno.pos <- data.frame(MarkerName = "m1", Chromosome = "1", Position = 123456)
get_zscore(data, geno.pos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.