
Calculate Lund Taxonomy Signature Scores
int_calc_signatures.RdWrapper function for calculating Lund Taxonomy scores.
Usage
int_calc_signatures(
this_data = NULL,
gene_id = "hgnc_symbol",
threshold_progression = 0.58,
threshold_grade = 0.5,
adjust = FALSE,
adj_factor = 5.1431,
verbose = TRUE
)Arguments
- this_data
Required parameter. Data frame or matrix with expression values.
- gene_id
Specify the type of gene identifier used in
this_data. Accepted values are; hgnc_symbol (default) or ensembl_gene_id.- threshold_progression
Threshold to flag a sample as high risk of progression, default is 0.58.
- threshold_grade
Threshold to flag a sample as high/low grade, default is 0.5.
- adjust
Boolean parameter. If TRUE, the function will proceed with adjusting the scores based on stable genes. If FALSE (default), no adjustment will be made and the original score values will be retained.
- adj_factor
Only applicable if adjust is set to TRUE. Allows users to apply a proportional adjustment to the normalized scores, enabling finer control over the final output values. After dividing each score by the mean expression of stable genes, the result is multiplied by this factor.
- verbose
A logical value indicating whether processing messages will be printed or not. Default is TRUE.
Value
A list of 2, a data frame with scores for the selected variable and a data frame with information on missing genes.
Details
This function internally calls a set of non-exported scoring functions starting with the int_ prefix. See individual function documentation for more information on the individual function calls.
Examples
#load packages
library(dplyr, multiclassPairs)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
#get scores for bundled data
my_scores = int_calc_signatures(this_data = sjodahl_2017)
#> 1. Calculating Proliferation Score
#> ------------------------------------------------------------
#> 2. Calculating Progression Score
#> ------------------------------------------------------------
#> 3. Applying Grade Predictor (WHO1999):
#> Total rules in classifier: 283
#> Rules with both genes present: 246
#> Rules removed: 37
#> Samples to score: 267
#> Grade threshold: 0.5
#> Grade labels: G1_2 / G3
#> ------------------------------------------------------------
#> 4. Applying Grade Predictor (WHO2022):
#> Total rules in classifier: 140
#> Rules with both genes present: 119
#> Rules removed: 21
#> Samples to score: 267
#> Grade threshold: 0.5
#> Grade labels: LG / HG
#> ------------------------------------------------------------
#> 5. Calculating Immune Signature Scores
#> ------------------------------------------------------------
#> 6. Calculating Stromal and Immune Composite Scores
#> ------------------------------------------------------------
#> 7. Merging Scores