Title: | Gene Scoring from Count Tables |
Version: | 0.1.1 |
Description: | Provides two methods for automatic calculation of gene scores from gene count tables: the z-score method, which requires a table of samples being scored and a count table with control samples, and the geometric mean method, which does not rely on control samples. The mathematical methods implemented are described by Kim et al. (2018) <doi:10.1089/jir.2017.0127>. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2024-10-24 15:59:42 UTC; ariseleftheriossyntakas |
Author: | Aris Syntakas [aut, cre] |
Maintainer: | Aris Syntakas <sejjsyn@ucl.ac.uk> |
Repository: | CRAN |
Date/Publication: | 2024-10-25 09:10:10 UTC |
Calculate Geometric Means from Count Tables
Description
This function computes the geometric mean for each sample in the given count table.
Usage
geomean(count_table)
Arguments
count_table |
A data frame of gene count data (genes as rows, samples as columns). All columns must be numeric. |
Value
A data frame with the geometric means per sample and the sample IDs.
Examples
# Example data to be scored
count_table <- data.frame(
sample1 = c(1, 10, 100),
sample2 = c(2, 20, 200),
sample3 = c(3, 30, 300)
)
rownames(count_table) <- c("gene1", "gene2", "gene3")
# Calculate Geometric Mean per sample in the count_table
geomean(count_table)
Calculate Z-Scores from Count Tables
Description
This function computes a Z-score sum for each sample in the given "scored" count table, based on the means and SDs of the genes in the control table.
Usage
zscore(scored_table, control_table)
Arguments
scored_table |
Data frame of samples to be scored (genes as rows, samples as columns). All columns must be numeric. |
control_table |
Data frame of control samples (genes as rows, samples as columns). All columns must be numeric. |
Value
A data frame with the sum of Z-scores per sample and the sample IDs.
Examples
# Example data to be scored
scored_table <- data.frame(
sample1 = c(1, 2, 3),
sample2 = c(4, 5, 6),
sample3 = c(7, 8, 9)
)
rownames(scored_table) <- c("gene1", "gene2", "gene3")
# Example control data
control_table <- data.frame(
control1 = c(1, 1, 1),
control2 = c(2, 2, 2),
control3 = c(3, 3, 3)
)
rownames(control_table) <- c("gene1", "gene2", "gene3")
# Calculate Z-score for each sample of the scored_table
zscore(scored_table, control_table)