Skip to content

SandraKla/AdRI_rpart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shiny App for "Automated sex and age partitioning for the estimation of reference intervals using a regression tree model."

This Shiny App computes age groups using the regression tree model based on the R package rpart, and then calculates reference intervals based on them using reflimR.

Decision Trees are used for machine learning. They can be used for classification (supervised learning), but also for clustering (unsupervised learning). In the Shiny App the Decision Tree is used as a tool to separate the data into age-groups. The proposed age groups from the Decision Tree are used to calculate the reference intervals.

Installation

Method 1: Use the function runGitHub() from the package shiny:

if("shiny" %in% rownames(installed.packages())){
  library(shiny)} else{install.packages("shiny")
  library(shiny)}
runGitHub("AdRI_rpart", "SandraKla")

Method 2 (not recommended): Download the Zip-File from this Shiny App. Unzip the file and set your working direction to the path of the folder. The package shiny (≥ 1.7.1) must be installed before using the Shiny App:

# Test if shiny is installed:
if("shiny" %in% rownames(installed.packages())){
  library(shiny)} else{install.packages("shiny")
  library(shiny)}

And then start the app with the following code:

runApp("app.R")

The package dplyr (≥ 1.1.3), ggplot2 (≥ 3.4.4), rpart (≥ 4.1.21), rpart.plot (≥ 3.1.1), reflimR (≥ 1.0.6) and shinydashboard (≥ 0.7.2) is downloaded or imported when starting this app. The used R-Version must be ≥ 4.3.2 (2023-10-31 ucrt).

Usage

On the left side, you can use the sidebar to choose the lab parameters. In the main panel, you will see the corresponding plot and the outputs.

The data can be downloaded in a suitable form for the Shiny app Zlog_AdRI.

Preloaded dataset

The biomarker data from the CALIPER study is available in this Shiny App in the CALIPER folder. The data was brought into the appropriate format for the analysis.

  • Albumin G (g/L)
  • Albumin P (g/L)
  • Alkaline Phosphatase (U/L)
  • ALT (ACT) (U/L)
  • ALT (U/L)
  • Amylase (U/L)
  • Apo A1 (g/L)
  • Apo B (g/L)
  • ASO (IU/mL)
  • AST (ACT) (U/L)
  • AST (U/L)
  • Bilirubin Direct (µmol/L)
  • Bilirubin-Total (T) (µmol/L)
  • C3 (g/L)
  • C4 (g/L)
  • Calcium (mmol/L)
  • ChE (U/L)
  • Cholesterol (mmol/L)
  • CO2 (carbon dioxide) (mmol/L)
  • Creatinine (enzymatic) (μmol/L)
  • Creatinine (Jaffe) (μmol/L)
  • CRP (mg/L)
  • GGT (U/L)
  • Haptoglobin (g/L)
  • IgA (g/L)
  • IgG (g/L)
  • IgM (g/L)
  • Iron (μmol/L)
  • LDH (LD) (U/L)
  • Lipase (lip) (U/L)
  • Magnesium (mmol/L)
  • Phosphorus (mmol/L)
  • Prealbumin (g/L)
  • RF (rheumatoid factor) (IU/mL)
  • Total Protein (g/L)
  • Transferrin (TRF) (g/L)
  • Triglyceride (mmol/L)
  • UHDL (Ultra HDL) (mmol/L)
  • Urea (mmol/L)
  • Uric Acid (µmol/L)

New data is loaded with read.csv2() and the tables are written with write.csv2(). The CSV file has a semicolon as separator. The data must contain the following information: SEX ("F" = female, "M" = male), AGE_DAYS (age in days), AGE_YEARS (age in years), VALUE (value of the analyte) and ANALYTE (name of the analyte):

SEX;AGE_DAYS;AGE_YEARS;VALUE;ANALYTE
M;2;0;1;EXAMPLE
F;2;0;2;EXAMPLE
F;3;0;;EXAMPLE
F;3;0;1;EXAMPLE
M;3;0;2;EXAMPLE

Contact

You are welcome to:

Link to the publication: Automated sex and age partitioning for the estimation of reference intervals using a regression tree model

About

Shiny App: Automated sex and age partitioning for the estimation of reference intervals using a regression tree model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages