Computational modeling and preclinical evaluation support targeting somatic instability for Huntington's disease treatment.
The 7 matches
- [1] § Results › Simulations of therapeutic targeting of somatic instability predict delayed progression of HD ↔ server.r, lines 888 to 971 · score 0.79 · therapy administration, motor symptoms, HD ISS stage, healthy treated, therapeutic benefit, CAG threshold · Report a mismatch
- [2] § Results › Model simulations recapitulate accelerated MSN loss with increasing germline CAG repeat length ↔ ui.r, lines 56 to 116 · score 0.79 · germline CAG repeat, inherited CAG repeat, somatic CAG repeat, phase linear model, CAG repeat expansion, somatic expansion · Report a mismatch
- [3] § Results › Model simulations recapitulate accelerated MSN loss with increasing germline CAG repeat length ↔ ui.r, lines 56 to 115 · score 0.78 · germline CAG repeat, inherited CAG repeat, somatic CAG repeat, phase linear model, CAG repeat expansion, somatic expansion · Report a mismatch
- [4] § Results › Simulations of therapeutic targeting of somatic instability predict delayed progression of HD ↔ ui.r, lines 56 to 116 · score 0.78 · medium spiny neurons, MSH3 knockdown, HD milestone, somatic CAG repeat, model tracks, motor symptoms · Report a mismatch
- [5] § Methods › Simulating CAG repeat expansion in MSNs ↔ server.r, lines 115 to 182 · score 0.77 · annual mutation event, phase linear model, p_exp, transition, probability, contraction · Report a mismatch
- [6] § Results › Simulations of therapeutic targeting of somatic instability predict delayed progression of HD ↔ server.r, lines 888 to 971 · score 0.72 · motor symptoms, HD ISS stage, predicted age, Therapeutic benefit, inherited, CAP · Report a mismatch
- [7] § Methods › Integrating external datasets ↔ global.r, lines 1 to 22 · score 0.64 · Enroll HD, motor score, HD ISS, phenotype, uhdrs, CAG · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 1,080 lines · 54 KB · no license · 3 matches
- options(gganimate.renderer = gifski_renderer())
- server <- function(input, output, session) {
- safe_min_age <- function(df, fallback) {
- if (nrow(df) == 0) return(fallback)
- return(min(df$Age))
- }
- # Instantiate progress bar
- updateProgressBar(session, id = "pbRun", value = 0, title = "Awaiting input...", status = "default")
- ########################################
- # Somatic Repeat Expansion Model Parameters
- ########################################
- ##### HD degeneration variables #####
- # The below length change mutation variable encodes the ratio of expansion to contraction events (recommend using probability ratio of 1 contraction event per 6 expansion events)
- length_change_mutation <- reactive({
- c(rep(-1, input$n_contractions), rep(1, input$n_expansions))
- })
- rate1 <- .035 # 36to55_CAGs Handsaker et al (supp Note 4) 3.51% +/- 0.83%.
- rate2 <- .576 # >55 CAGs Handsaker et al (supp Note 4) 57.6% +/- 12.76%.
- # Two phase linear model (Handsaker et al)
- T1 <- 33.5
- T2 <- 55
- r1 <- .035
- r2 <- .576
- # Create the function
- twoPhaseLinearModel <- function(x){ r1*max(x-T1,0) + r2*max(x-T2,0)}
- # Create plot renderer tracker
- renderState <- reactiveValues(animationDone = FALSE, linePlotDone = FALSE, healthyDone = FALSE)
- renderState$animationDone <- FALSE
- renderState$plotDone <- FALSE
- renderState$healthyDone <- FALSE
- stored_plots <- reactiveValues(linePlot = NULL, healthyPlot = NULL)
- stored_plots$modelComparisonPlot <- NULL
- # Handsaker-style CTMC helpers ------------------------------------------------
- # In the Handsaker model, p_exp splits the total mutation rate into expansion
- # and contraction rates, then a one-year transition matrix is computed using
- # expm(Q). This differs from the Latus event-sampling implementation, which
- # samples an integer number of mutation events per year.
- if (!requireNamespace("expm", quietly = TRUE)) {
- install.packages("expm", repos = "https://cran.rstudio.com/")
- }
- generate_handsaker_Q <- function(pexp, r1_mut, r2_mut, T1 = 33.5, T2 = 72.2, max_cag = 500,
- rate_modifier = 1) {
- Q <- matrix(0, nrow = max_cag, ncol = max_cag)
- for (i in 2:(max_cag - 1)) {
- rate <- rate_modifier * (r1_mut * max(i - T1, 0) + r2_mut * max(i - T2, 0))
- expansion_rate <- rate * pexp
- contraction_rate <- rate * (1 - pexp)
- Q[i, i - 1] <- contraction_rate
- Q[i, i + 1] <- expansion_rate
- Q[i, i] <- -(expansion_rate + contraction_rate)
- }
- return(Q)
- }
- simulate_one_ctmc_step <- function(cag, transition_matrix) {
- cag <- max(2, min(as.integer(round(cag)), nrow(transition_matrix)))
- pdf <- transition_matrix[cag, ]
- cdf <- cumsum(pdf)
- p <- runif(1)
- idx <- which(cdf >= p)[1]
- if (is.na(idx)) idx <- length(cdf)
- return(idx)
- }
- simulate_handsaker_lifecycle <- function(ncells, years, initial_cag, age_at_intervention,
- transduction_rate, therapeutic_modifier, pexp,
- untreated = FALSE, max_cag = 500) {
- # Fig. SN4.4 reports effective net expansion rates of 3.51% and 57.6%.
- # In the CTMC, net expansion = mutation_rate * (2*p_exp - 1), so convert
- # these net rates back to total mutation-rate constants before building Q.
- net_factor <- 2 * pexp - 1
- if (net_factor <= 0) stop("p_exp must be > 0.5 for positive net expansion")
- r1_mut <- 0.035 / net_factor
- r2_mut <- 0.576 / net_factor
- Q_base <- generate_handsaker_Q(pexp, r1_mut, r2_mut, T1 = 33.5, T2 = 72.2,
- max_cag = max_cag, rate_modifier = 1)
- Q_tx <- generate_handsaker_Q(pexp, r1_mut, r2_mut, T1 = 33.5, T2 = 72.2,
- max_cag = max_cag, rate_modifier = (1 - therapeutic_modifier))
- P_base <- expm::expm(Q_base)
- P_tx <- expm::expm(Q_tx)
- repeat_lengths <- rep(as.integer(initial_cag), ncells)
- therapeutic_status <- rep("0", ncells)
- out <- data.frame()
- for (year in 0:years) {
- # Match the existing Latus model: therapy is administered before the
- # intervention-year state is recorded, so transduced cells are visible
- # at Year == age_at_intervention.
- if (!untreated && year == age_at_intervention) {
- therapeutic_status <- ifelse(rbinom(ncells, 1, transduction_rate) == 1, "transduced", "0")
- }
- out <- rbind(out, data.frame(
- Year = year,
- RepeatLength = repeat_lengths,
- CellID = seq_along(repeat_lengths),
- Transduction = therapeutic_status,
- Model = "Handsaker_CTM"
- ))
- # Apply one-year transition after recording the current state
- for (j in seq_along(repeat_lengths)) {
- if (repeat_lengths[j] < max_cag) {
- if (!untreated && therapeutic_status[j] == "transduced" && year >= age_at_intervention) {
- repeat_lengths[j] <- simulate_one_ctmc_step(repeat_lengths[j], P_tx)
- } else {
- repeat_lengths[j] <- simulate_one_ctmc_step(repeat_lengths[j], P_base)
- }
- }
- }
- }
- return(out)
- }
- # Build descriptive filename prefix from current input parameters
- get_file_prefix <- reactive({
- paste0("HD_sim",
- "_CAG", input$germlineHDRepeatLength,
- "_intAge", input$age_at_intervention,
- "_life", input$maxLifetime,
- "_MSH3kd", input$therapeuticModifier * 100, "pct",
- "_transd", input$transductionRate * 100, "pct",
- "_nMSN", input$nMSNs_CaudatePutamen,
- "_thresh", input$HealthyCellCAG_Threshold,
- "_contr", input$n_contractions,
- "_exp", input$n_expansions,
- "_pexp", input$p_exp,
- "_model", input$modelMode)
- })
- ########################################
- # Define object classes
- ########################################
- # Create object class representing an individual cell
- Cell <- R6Class("Cell",
- public = list(
- repeat_length = NULL,
- therapeutic_status = 0,
- year_counter = 0,
- initialize = function(repeat_length = 0) {
- self$repeat_length <- repeat_length
- self$therapeutic_status <- 0
- self$year_counter <- 0
- },
- get_repeat_length = function() {
- return(self$repeat_length)
- },
- therapeutic_transduction_event = function() {
- transductionOutcome <- rbinom(1,1, input$transductionRate)
- if (transductionOutcome == 1) {
- self$therapeutic_status <- "transduced"
- } else {
- self$therapeutic_status <- self$therapeutic_status
- }
- },
- get_therapeutic_transduction_status = function() {
- return(self$therapeutic_status)
- },
- mutate_repeat = function() {
- # Compute probability of mutation event
- AnnualMutationRate <- twoPhaseLinearModel(self$repeat_length)
- # Function to mutate repeat
- mutate_length <- function(times) {
- self$repeat_length <- self$repeat_length + sum(sample(length_change_mutation() , times, replace = TRUE))
- }
- if(AnnualMutationRate <= 1){
- # single mutation event
- if (rbinom(1, 1, AnnualMutationRate) == 1) {
- mutate_length(1)
- }
- } else {
- # Multiple mutation events
- cycles <- min(as.integer(AnnualMutationRate), 100) # Cap cycles at 100
- remainder <- AnnualMutationRate %% 1
- # Process full cycles
- mutate_length(cycles)
- # Process remainder
- if (rbinom(1, 1, remainder) == 1) {
- mutate_length(1)
- }
- }
- },
- mutate_repeat_with_therapy = function() {
- # Compute probability of mutation event
- # Here we use therapeuticModifier value to reduce the annual mutation rate
- AnnualMutationRate <- twoPhaseLinearModel(self$repeat_length) * (1 - input$therapeuticModifier)
- # Function to mutate repeat
- mutate_length <- function(times) {
- self$repeat_length <- self$repeat_length + sum(sample(length_change_mutation() , times, replace = TRUE))
- }
- if(AnnualMutationRate <= 1){
- # single mutation event
- if (rbinom(1, 1, AnnualMutationRate) == 1) {
- mutate_length(1)
- }
- } else {
- # multiple mutation events
- cycles <- min(as.integer(AnnualMutationRate), 100) # Cap cycles at 100
- remainder <- AnnualMutationRate %% 1
- # Process full cycles
- mutate_length(cycles)
- # Process remainder
- if (rbinom(1, 1, remainder) == 1) {
- mutate_length(1)
- }
- }
- },
- set_repeat_length = function(new_length) {
- self$repeat_length <- new_length
- },
- describe = function() {
- cat("This cell has a repeat length of", self$repeat_length, "\n")
- }
- )
- )
- # Create object class representing a population of cells
- PopulationManager <- R6Class("PopulationManager",
- public = list(
- cells = NULL,
- initialize = function(cell_collection) {
- self$cells <- cell_collection
- },
- mutate_all_cells = function() {
- for (cell in self$cells) {
- if (cell$get_repeat_length() <= 300) {
- cell$mutate_repeat()
- }
- }
- },
- mutate_transduced_cells_with_therapy = function() {
- for (cell in self$cells) {
- if (cell$get_repeat_length() <= 300) {
- if (cell$get_therapeutic_transduction_status() == "transduced") {
- cell$mutate_repeat_with_therapy()
- } else {
- cell$mutate_repeat()
- }
- }
- }
- },
- administer_gene_therapy = function() {
- for (cell in self$cells) {
- cell$therapeutic_transduction_event()
- }
- },
- run_lifecycle = function(years) {
- data <- data.frame()
- for (year in 0:years) {
- repeat_lengths <- sapply(self$cells, function(cell) cell$get_repeat_length())
- transduction_status <- 0
- data <- rbind(data, data.frame(Year = year, RepeatLength = repeat_lengths, CellID = c(1:length(repeat_lengths)), Transduction = transduction_status))
- self$mutate_all_cells()
- }
- return(data)
- },
- run_lifecycle_with_therapy = function(years, untreated) {
- if (untreated != TRUE) {
- data <- data.frame()
- # run repeat expansion before gene therapy intervention
- for (year in 0:(input$age_at_intervention-1)) {
- repeat_lengths <- sapply(self$cells, function(cell) cell$get_repeat_length())
- transduction_status <- sapply(self$cells, function(cell) cell$get_therapeutic_transduction_status())
- data <- rbind(data, data.frame(Year = year, RepeatLength = repeat_lengths, CellID = c(1:length(repeat_lengths)), Transduction = transduction_status))
- self$mutate_all_cells()
- }
- # Administer gene therapy
- self$administer_gene_therapy()
- # run repeat expansion after gene therapy intervention
- for (year in input$age_at_intervention:years) {
- repeat_lengths <- sapply(self$cells, function(cell) cell$get_repeat_length())
- transduction_status <- sapply(self$cells, function(cell) cell$get_therapeutic_transduction_status())
- data <- rbind(data, data.frame(Year = year, RepeatLength = repeat_lengths, CellID = c(1:length(repeat_lengths)), Transduction = transduction_status))
- self$mutate_transduced_cells_with_therapy()
- }
- return(data)
- } else {
- data <- data.frame()
- for (year in 0:years) {
- repeat_lengths <- sapply(self$cells, function(cell) cell$get_repeat_length())
- transduction_status <- sapply(self$cells, function(cell) cell$get_therapeutic_transduction_status())
- data <- rbind(data, data.frame(Year = year, RepeatLength = repeat_lengths, CellID = c(1:length(repeat_lengths)), Transduction = transduction_status))
- self$mutate_transduced_cells_with_therapy()
- }
- return(data)
- }
- }
- )
- )
- observe({
- if (renderState$animationDone && renderState$linePlotDone && renderState$healthyDone) {
- updateProgressBar(session, id = "pbRun", value = 100, title = "Complete!", status = "success")
- # Re-enable Run button
- session$sendCustomMessage(type = "enableButton", message = list(id = "run"))
- # Reset flags for next run
- renderState$animationDone <- FALSE
- renderState$linePlotDone <- FALSE
- renderState$healthyDone <- FALSE
- }
- })
- ########################################
- # Run Simulation
- ########################################
- # Simulation must happen within this reactive block
- simulation_data <- eventReactive(input$run, {
- validate(
- need(input$maxLifetime > input$age_at_intervention,
- "Error: Max Lifetime must be greater than Age at Intervention."),
- )
- # Disable run simulation button after it is pressed
- session$sendCustomMessage(type = "disableButton", message = list(id = "run"))
- # Reset progress bar to 0
- updateProgressBar(session, id = "pbRun", value = 0, status = "info", title = "Running...")
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 10, status = "info", title = "Starting simulation...")
- Sys.sleep(0.3)
- ######## CAP SCORE #############
- # Create a CAP score function
- # CAP = Age x (CAG-L)+ / K
- # (CAG-L)+ is a function that equals x when x >= 0 and 0 otherwise.
- CAG_L_fun <- function(x) {
- if (x >= 0) {
- return(x)
- } else {
- return(0)
- }
- }
- CAP_Score_Fun <- function(CurrentAge){
- L <- 30 # an estimate of the lower limit of CAG expansion values for which toxicity occurs
- K <- 6.49
- CAP_score <- CurrentAge * CAG_L_fun(input$germlineHDRepeatLength - L) / K
- return(list(CAP_score, K))
- }
- CAP_Score_Lookup_Table <- sapply(c(1:100), function(x){
- CAP_Score_Fun(x)[[1]]
- })
- Predicted_AgeOfOnset <- length(CAP_Score_Lookup_Table[CAP_Score_Lookup_Table <= 100])
- # # Compute stage data frames
- # stage1_df <- barplot_data_pct_dead_cells_merged[grep("1", barplot_data_pct_dead_cells_merged$HD_ISS_Stage), ]
- # stage2_df <- barplot_data_pct_dead_cells_merged[grep("2", barplot_data_pct_dead_cells_merged$HD_ISS_Stage), ]
- # stage3_df <- barplot_data_pct_dead_cells_merged[grep("3", barplot_data_pct_dead_cells_merged$HD_ISS_Stage), ]
- ### Instantiate Cells ###
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 20, title = "Generating cell populations...")
- Sys.sleep(0.3)
- # Create cell collection
- cell_collection <- list()
- cell_collection_untreated <- list()
- #Instantiate cell objects with germline repeat length
- for (MSN in 1:input$nMSNs_CaudatePutamen) {
- MSN <- Cell$new(input$germlineHDRepeatLength)
- cell_collection[[length(cell_collection) + 1]] <- MSN
- }
- # Instantiate cell objects with germline repeat length
- for (MSN in 1:input$nMSNs_CaudatePutamen) {
- MSN <- Cell$new(input$germlineHDRepeatLength)
- cell_collection_untreated[[length(cell_collection_untreated) + 1]] <- MSN
- }
- ### Create and Manipulate Populations of Cells ###
- # Create PopulationManager
- population <- PopulationManager$new(cell_collection)
- population_untreated <- PopulationManager$new(cell_collection_untreated)
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 30, title = "Running cell mutation simulation...")
- Sys.sleep(0.3)
- # Run simulation
- #if (input$therapy_on == TRUE) {
- # Get data for each year in lifetime (therapy on)
- plot_data <- population$run_lifecycle_with_therapy(input$maxLifetime, untreated = FALSE)
- plot_data_untreated <- population_untreated$run_lifecycle_with_therapy(input$maxLifetime, untreated = TRUE)
- #} else {
- # plot_data <- population$run_lifecycle(input$maxLifetime)
- # plot_data_untreated <- data.frame()
- #}
- ### Calculate Effect Size ###
- # Get pct of cells <= 150
- get_healthy_cells_fun <- function(z) {
- levels <- levels(as.factor(z$Year))
- barplot_data_pct_healthy_cells <- sapply(levels, function(x) {
- y <- as.numeric(x)
- year_subset <- z[z$Year == y,]
- pcthealthy <- (sum(year_subset$RepeatLength <= input$HealthyCellCAG_Threshold, na.rm = TRUE) / length(year_subset$RepeatLength)) * 100
- return(c(y, pcthealthy))
- } )
- barplot_data_pct_healthy_cells <- barplot_data_pct_healthy_cells
- barplot_data_pct_healthy_cells <- t(as.data.frame(barplot_data_pct_healthy_cells))
- barplot_data_pct_healthy_cells <- as.data.frame(barplot_data_pct_healthy_cells)
- colnames(barplot_data_pct_healthy_cells) <- c("Age","pct_healthy_Cells")
- return(barplot_data_pct_healthy_cells)
- }
- barplot_data_pct_healthy_cells <- get_healthy_cells_fun(plot_data)
- barplot_data_pct_healthy_cells_untreated <- get_healthy_cells_fun(plot_data_untreated)
- barplot_data_pct_healthy_cells_merged <- merge(barplot_data_pct_healthy_cells,barplot_data_pct_healthy_cells_untreated, by = "Age")
- colnames(barplot_data_pct_healthy_cells_merged) <- c("Age","HealthyTreated","HealthyUntreated")
- # Calculate intersect of CAP-100 with untreated cells
- PctHealthCells_at_Predicted_AgeOfOnset <- barplot_data_pct_healthy_cells_untreated[Predicted_AgeOfOnset == barplot_data_pct_healthy_cells_untreated$Age,][1,2]
- # # Get Therapeutic benefit (years of delayed onset)
- shiftedAge <- min(barplot_data_pct_healthy_cells[PctHealthCells_at_Predicted_AgeOfOnset >= barplot_data_pct_healthy_cells$pct_healthy_Cells,][,1])
- therapeuticBenefitYears <- shiftedAge - Predicted_AgeOfOnset
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 40, title = "Running cell mutation simulation...")
- Sys.sleep(0.3)
- # Calculate therapeutic benefit for treatment across all ages
- therapeuticBenefitYears_fun <- function(ages){
- shiftedAge <- min(barplot_data_pct_healthy_cells[PctHealthCells_at_Predicted_AgeOfOnset >= barplot_data_pct_healthy_cells$pct_healthy_Cells,][,1])
- return(shiftedAge)
- }
- # Calculate dead cell percentages for treated cells
- barplot_data_pct_dead_cells <- get_dead_cells_fun(plot_data)
- # Calculate dead cell percentages for untreated cells
- barplot_data_pct_dead_cells_untreated <- get_dead_cells_fun(plot_data_untreated)
- # Merge the two dead cell data frames by Age
- barplot_data_pct_dead_cells_merged <- merge(barplot_data_pct_dead_cells,
- barplot_data_pct_dead_cells_untreated,
- by = "Age")
- colnames(barplot_data_pct_dead_cells_merged) <- c("Age", "DeadTreated", "DeadUntreated")
- # Define HD-ISS Stage function
- Run_HDISS_score_fun_production <- function(pct_cells_alive, age, cag){
- age <- as.numeric(age)
- if (age %in% colnames(TotalFunctionalCapacity_Score)) {
- #print(paste0("age is ", age, " class is ", class(age)))
- # Extract functional capacity and ensure it's a single value
- FunctionalCapacityVal <- as.numeric(TotalFunctionalCapacity_Score[grep(paste0('\\b', cag, '\\b'), TotalFunctionalCapacity_Score$CAG), grep(paste0('\\b', age, '\\b'), colnames(TotalFunctionalCapacity_Score))])
- if (length(FunctionalCapacityVal) != 1) {
- stop("Functional Capacity should be a single value.")
- #FunctionalCapacityVal <- 1
- } else if (is.na(FunctionalCapacityVal)) {
- FunctionalCapacityVal <- 1
- } else if (FunctionalCapacityVal == 0) {
- FunctionalCapacityVal <- 1
- } else {
- FunctionalCapacityVal <- as.numeric(FunctionalCapacityVal)
- }
- #print(paste0("functional capacity is ", FunctionalCapacityVal, " class is ", class(FunctionalCapacityVal)))
- # Extract motor score and ensure it's a single value
- MotorScoreVal <- as.numeric(Motor_Score[grep(paste0('\\b', cag, '\\b'), Motor_Score$CAG), grep(paste0('\\b', age, '\\b'), colnames(Motor_Score))])
- if (length(as.numeric(MotorScoreVal)) != 1) {
- stop("Motor Score should be a single value.")
- #MotorScoreVal <- 0
- } else if (is.na(MotorScoreVal)) {
- MotorScoreVal <- 80
- } else {
- MotorScoreVal <- as.numeric(MotorScoreVal)
- }
- #print(paste0("Motor score is ", MotorScoreVal, " class s is ", class(MotorScoreVal)))
- # Call the function with validated inputs
- HD_ISS_Stage <- HD_ISS_Stage_Calc_FUN(
- CurrentAge = as.numeric(age),
- cag = as.numeric(input$germlineHDRepeatLength),
- brainVolume = as.numeric(pct_cells_alive),
- motorScore = as.numeric(MotorScoreVal),
- functionalCapacity = as.numeric(FunctionalCapacityVal)
- )
- # Check to confirm the function is working
- print(paste0("age is ", age, " ISS stage is ", HD_ISS_Stage, " Motor Score is ", MotorScoreVal, " functionalCapacity is ", FunctionalCapacityVal))
- # output only stage
- return(HD_ISS_Stage)
- } else {
- return(NA)
- }
- }
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 60, title = "Running cell mutation simulation...")
- Sys.sleep(0.3)
- # Calculate HD-ISS stage across all ages
- HDISS_Stages <- apply(barplot_data_pct_dead_cells_merged, 1, function(x){
- #x <- as.character(x)
- #print(x)
- #return(x)
- age <- x[1]
- #print(paste0("age is ", age))
- pctAliveCells <- (100 - x[3]) / 100
- #print(paste0("pctAliveCells is ", pctAliveCells))
- HDISS_Stage <- Run_HDISS_score_fun_production(pctAliveCells, age, input$germlineHDRepeatLength)
- return(HDISS_Stage)
- })
- barplot_data_pct_dead_cells_merged["HD_ISS_Stage"] <- HDISS_Stages
- stage1_df <- barplot_data_pct_dead_cells_merged[grep("1", barplot_data_pct_dead_cells_merged$HD_ISS_Stage),]
- stage2_df <- barplot_data_pct_dead_cells_merged[grep("2", barplot_data_pct_dead_cells_merged$HD_ISS_Stage),]
- stage3_df <- barplot_data_pct_dead_cells_merged[grep("3", barplot_data_pct_dead_cells_merged$HD_ISS_Stage),]
- s1_start <- safe_min_age(stage1_df, input$maxLifetime)
- s2_start <- safe_min_age(stage2_df, input$maxLifetime)
- s3_start <- safe_min_age(stage3_df, input$maxLifetime)
- background_data <- data.frame(
- xmin = as.numeric(c(-Inf, s1_start, s2_start, s3_start)),
- xmax = as.numeric(c(s1_start, s2_start, s3_start, input$maxLifetime)),
- ymin = rep(-Inf, 4),
- ymax = rep(Inf, 4),
- fill = factor(c("white", "lightgrey", "grey", "darkgrey"),
- levels = c("white", "lightgrey", "grey", "darkgrey"))
- )
- # background_data <- data.frame(
- # xmin = as.numeric(c(-Inf, min(stage1_df$Age), min(stage2_df$Age), min(stage3_df$Age))),
- # xmax = as.numeric(c(min(stage1_df$Age), min(stage2_df$Age), min(stage3_df$Age), input$maxLifetime)),
- # ymin = rep(-Inf, 4),
- # ymax = rep(Inf, 4),
- # fill = factor(c("white", "lightgrey", "grey", "darkgrey"), levels = c("white", "lightgrey", "grey", "darkgrey"))
- # )
- # Run Function on healthy cells
- barplot_data_pct_healthy_cells <- get_healthy_cells_fun(plot_data)
- barplot_data_pct_healthy_cells_untreated <- get_healthy_cells_fun(plot_data_untreated)
- barplot_data_pct_healthy_cells_merged <- merge(barplot_data_pct_healthy_cells,barplot_data_pct_healthy_cells_untreated, by = "Age")
- colnames(barplot_data_pct_healthy_cells_merged) <- c("Age","HealthyTreated","HealthyUntreated")
- linePlot_data <- merge(barplot_data_pct_healthy_cells_merged, barplot_data_pct_dead_cells_merged, by = "Age")
- # Combine stages into a data frame with new colors
- convertToTreated_fun <- function(x){
- selected_line <- linePlot_data[linePlot_data$Age == x,]
- pctHealthUntreatedCells <- selected_line[3]
- selected_line_2 <- linePlot_data[linePlot_data$HealthyTreated >= pctHealthUntreatedCells[1,1],]
- age <- max(selected_line_2$Age) + 1
- return(age)
- }
- background_data_treated <- data.frame(
- xmin = as.numeric(c(-Inf, convertToTreated_fun(s1_start), convertToTreated_fun(s2_start), convertToTreated_fun(s3_start))),
- xmax = as.numeric(c(convertToTreated_fun(s1_start), convertToTreated_fun(s2_start), convertToTreated_fun(s3_start), input$maxLifetime)),
- ymin = rep(-Inf, 4),
- ymax = rep(Inf, 4),
- fill = factor(c("white", "lightgrey", "grey", "darkgrey"), levels = c("white", "lightgrey", "grey", "darkgrey"))
- )
- # Update progress bar
- updateProgressBar(session, id = "pbRun", value = 70, title = "Rendering output plots...")
- Sys.sleep(0.3)
- #plot_data_list <- list(plot_data,plot_data_untreated,background_data,background_data_treated)
- # Return all needed objects as a list
- plot_data_list <- list(
- plot_data = plot_data,
- plot_data_untreated = plot_data_untreated,
- background_data = background_data,
- background_data_treated = background_data_treated,
- stage1_df = stage1_df,
- stage2_df = stage2_df,
- stage3_df = stage3_df,
- barplot_data_pct_dead_cells_merged = barplot_data_pct_dead_cells_merged,
- barplot_data_pct_healthy_cells_merged = barplot_data_pct_healthy_cells_merged,
- therapeuticBenefitYears = therapeuticBenefitYears,
- linePlot_data = linePlot_data)
- return(plot_data_list)
- })
- ########################################
- # Handsaker CTMC comparison simulation
- ########################################
- handsaker_simulation_data <- eventReactive(input$run, {
- validate(
- need(input$maxLifetime > input$age_at_intervention,
- "Error: Max Lifetime must be greater than Age at Intervention."),
- need(input$p_exp > 0.5,
- "Error: Handsaker p_exp must be > 0.5 for net expansion.")
- )
- plot_data_h <- simulate_handsaker_lifecycle(
- ncells = input$nMSNs_CaudatePutamen,
- years = input$maxLifetime,
- initial_cag = input$germlineHDRepeatLength,
- age_at_intervention = input$age_at_intervention,
- transduction_rate = input$transductionRate,
- therapeutic_modifier = input$therapeuticModifier,
- pexp = input$p_exp,
- untreated = FALSE
- )
- plot_data_untreated_h <- simulate_handsaker_lifecycle(
- ncells = input$nMSNs_CaudatePutamen,
- years = input$maxLifetime,
- initial_cag = input$germlineHDRepeatLength,
- age_at_intervention = input$age_at_intervention,
- transduction_rate = input$transductionRate,
- therapeutic_modifier = input$therapeuticModifier,
- pexp = input$p_exp,
- untreated = TRUE
- )
- healthy_h <- get_healthy_cells_fun(plot_data_h, input$HealthyCellCAG_Threshold)
- healthy_h_untreated <- get_healthy_cells_fun(plot_data_untreated_h, input$HealthyCellCAG_Threshold)
- healthy_h_merged <- merge(healthy_h, healthy_h_untreated, by = "Age")
- colnames(healthy_h_merged) <- c("Age", "HealthyTreated", "HealthyUntreated")
- dead_h <- get_dead_cells_fun(plot_data_h)
- dead_h_untreated <- get_dead_cells_fun(plot_data_untreated_h)
- dead_h_merged <- merge(dead_h, dead_h_untreated, by = "Age")
- colnames(dead_h_merged) <- c("Age", "DeadTreated", "DeadUntreated")
- line_h <- merge(healthy_h_merged, dead_h_merged, by = "Age")
- line_h$Model <- "Handsaker CTMC"
- return(list(
- plot_data = plot_data_h,
- plot_data_untreated = plot_data_untreated_h,
- linePlot_data = line_h,
- healthy_cells = healthy_h_merged,
- dead_cells = dead_h_merged
- ))
- })
- ########################################
- # Active model selector
- ########################################
- active_simulation_data <- reactive({
- if (input$modelMode == "handsaker") {
- handsaker_simulation_data()
- } else {
- simulation_data()
- }
- })
- #######################################
- # Create and Render Output Plots
- #######################################
- # Create a CAP score function
- # CAP = Age x (CAG-L)+ / K
- # (CAG-L)+ is a function that equals x when x >= 0 and 0 otherwise.
- CAG_L_fun <- function(x) {
- if (x >= 0) {
- return(x)
- } else {
- return(0)
- }
- }
- CAP_Score_Fun <- function(CurrentAge, repLen){
- L <- 30 # an estimate of the lower limit of CAG expansion values for which toxicity occurs
- K <- 6.49
- CAP_score <- CurrentAge * CAG_L_fun(repLen - L) / K
- return(list(CAP_score, K))
- }
- GetPredAgeOfOnset <- function(repLen){
- CAP_Score_Lookup_Table <- sapply(c(1:100), function(x){
- CAP_Score_Fun(x, repLen)[[1]]
- })
- Predicted_AgeOfOnset <- length(CAP_Score_Lookup_Table[CAP_Score_Lookup_Table <= 100])
- return(Predicted_AgeOfOnset)
- }
- ### Create animated plot of cell loss ###
- make_repeat_animation <- function(plot_data, title_prefix, repeat_len, highlight, max_life) {
- threshold <- input$HealthyCellCAG_Threshold
- if (highlight != TRUE) {
- p <- ggplot(plot_data, aes(x = RepeatLength, y = CellID)) +
- geom_point(aes(color = RepeatLength), alpha = 0.7) +
- geom_vline(xintercept = threshold, color = "red", linetype = "dashed") +
- scale_color_gradient2(low = "forestgreen", mid = "red", high = "red", midpoint = 200) +
- labs(title = title_prefix,
- subtitle = "Year: {frame_time}. CAP Score: {round(CAP_Score_Fun(frame_time, repeat_len)[[1]], 2)}",
- x = "Repeat Length",
- y = "") +
- theme_minimal() +
- theme(axis.text.y = element_blank(), axis.ticks.y = element_blank()) +
- coord_cartesian(xlim = c(0, 285)) +
- transition_time(Year) +
- ease_aes('linear')
- } else {
- p <- ggplot(plot_data, aes(x = RepeatLength, y = CellID)) +
- geom_point(aes(color = RepeatLength), alpha = 0.7) +
- geom_point(data = subset(plot_data, Transduction == "transduced"),
- aes(x = RepeatLength, y = CellID),
- color = "violet", shape = 21, size = 3, fill = NA) +
- geom_vline(xintercept = threshold, color = "red", linetype = "dashed") +
- scale_color_gradient2(low = "forestgreen", mid = "red", high = "red", midpoint = 200) +
- labs(title = title_prefix,
- subtitle = "Year: {frame_time}. CAP Score: {round(CAP_Score_Fun(frame_time, repeat_len)[[1]], 2)}",
- x = "Repeat Length",
- y = "") +
- theme_minimal() +
- theme(axis.text.y = element_blank(), axis.ticks.y = element_blank()) +
- coord_cartesian(xlim = c(0, 285)) +
- transition_time(Year) +
- ease_aes('linear')
- }
- return(p)
- }
- output$animationPlot <- renderImage({
- d <- active_simulation_data()
- plot_data <- d$plot_data
- repeat_len <- isolate(input$germlineHDRepeatLength)
- highlight <- isolate(input$highlightTransducedCells)
- max_life <- isolate(input$maxLifetime)
- model_title <- ifelse(input$modelMode == "handsaker",
- paste0("Handsaker CTMC model (p_exp = ", input$p_exp, ")"),
- "Latus event-sampling model")
- p <- make_repeat_animation(plot_data,
- title_prefix = model_title,
- repeat_len = repeat_len,
- highlight = highlight,
- max_life = max_life)
- anim_file <- tempfile(fileext = '.gif')
- anim_save(anim_file, animate(p, nframes = max_life, fps = 4))
- isolate({ renderState$animationDone <- TRUE })
- list(src = anim_file,
- contentType = 'image/gif',
- width = 800,
- height = 600,
- alt = "Repeat expansion animation")
- }, deleteFile = TRUE)
- ### Collect information about dead cells ### Collect information about dead cells (>300 CAGs) ###
- # Define function
- get_dead_cells_fun <- function(z){
- levels <- levels(as.factor(z$Year))
- barplot_data_pct_dead_cells <- sapply(levels, function(x) {
- y <- as.numeric(x)
- year_subset <- z[z$Year == y,]
- pctDead <- (sum(year_subset$RepeatLength >= 300, na.rm = TRUE) / length(year_subset$RepeatLength)) * 100
- return(c(y, pctDead))
- } )
- barplot_data_pct_dead_cells <- barplot_data_pct_dead_cells
- barplot_data_pct_dead_cells <- t(as.data.frame(barplot_data_pct_dead_cells))
- barplot_data_pct_dead_cells <- as.data.frame(barplot_data_pct_dead_cells)
- colnames(barplot_data_pct_dead_cells) <- c("Age","pct_Dead_Cells")
- return(barplot_data_pct_dead_cells)
- }
- # Render plot
- output$deadCellsPlot <- renderPlot({
- # Make plot_data dataframes generated in simulation dataframes availible ###
- plot_data <- simulation_data()[[1]]
- plot_data_untreated <- simulation_data()[[2]]
- # Run Function on dead cells
- barplot_data_pct_dead_cells <- get_dead_cells_fun(plot_data)
- #barplot_data_pct_dead_cells_untreated <- get_dead_cells_fun(plot_data_untreated)
- #barplot_data_pct_dead_cells_merged <- merge(barplot_data_pct_dead_cells,barplot_data_pct_dead_cells_untreated, by = "Age")
- #colnames(barplot_data_pct_dead_cells_merged) <- c("Age","DeadTreated","DeadUntreated")
- dead_plot <- ggplot(barplot_data_pct_dead_cells, aes(x = Age, y = pct_Dead_Cells)) +
- geom_bar(stat = "identity", fill = "steelblue") +
- theme_cowplot() +
- ylim(0, 100) +
- labs(title = "Percentage of Dead Cells", x = "Age", y = "% Dead Cells")
- return(dead_plot)
- })
- ### Collect information about healthy cells (<150 CAGs) ###
- # Define function
- get_healthy_cells_fun <- function(z, threshold = input$HealthyCellCAG_Threshold) {
- levels <- levels(as.factor(z$Year))
- barplot_data_pct_healthy_cells <- sapply(levels, function(x) {
- y <- as.numeric(x)
- year_subset <- z[z$Year == y,]
- pcthealthy <- (sum(year_subset$RepeatLength <= threshold, na.rm = TRUE) / length(year_subset$RepeatLength)) * 100
- return(c(y, pcthealthy))
- } )
- barplot_data_pct_healthy_cells <- t(as.data.frame(barplot_data_pct_healthy_cells))
- barplot_data_pct_healthy_cells <- as.data.frame(barplot_data_pct_healthy_cells)
- colnames(barplot_data_pct_healthy_cells) <- c("Age","pct_healthy_Cells")
- return(barplot_data_pct_healthy_cells)
- }
- ### Create histogram of healthy cells ###
- output$healthyCellsPlot <- renderPlot({
- d <- active_simulation_data()
- if (!is.null(d$barplot_data_pct_healthy_cells_merged)) {
- barplot_data_pct_healthy_cells <- d$barplot_data_pct_healthy_cells_merged[, c("Age", "HealthyTreated")]
- colnames(barplot_data_pct_healthy_cells) <- c("Age", "pct_healthy_Cells")
- } else if (!is.null(d$healthy_cells)) {
- barplot_data_pct_healthy_cells <- d$healthy_cells[, c("Age", "HealthyTreated")]
- colnames(barplot_data_pct_healthy_cells) <- c("Age", "pct_healthy_Cells")
- } else {
- barplot_data_pct_healthy_cells <- get_healthy_cells_fun(d$plot_data, input$HealthyCellCAG_Threshold)
- }
- healthy_plot <- ggplot(barplot_data_pct_healthy_cells, aes(x = Age, y = pct_healthy_Cells)) +
- geom_bar(stat = "identity", fill = "steelblue") +
- theme_cowplot() +
- ylim(0, 100) +
- labs(title = paste0("Percentage of Cells Under ", input$HealthyCellCAG_Threshold, " Repeats"),
- subtitle = ifelse(input$modelMode == "handsaker", "Handsaker CTMC model", "Latus event-sampling model"),
- x = "Age", y = paste0("% Cells Under ", input$HealthyCellCAG_Threshold, " Repeats"))
- isolate({ renderState$healthyDone <- TRUE })
- updateProgressBar(session, id = "pbRun", value = 80, title = "Rendering output plots...")
- stored_plots$healthyPlot <- healthy_plot
- return(healthy_plot)
- })
- ### Create a line plot of from both treated and untreated datasets ###
- output$linePlot <- renderPlot({
- d <- active_simulation_data()
- repeat_len <- isolate(input$germlineHDRepeatLength)
- intervention_age <- isolate(input$age_at_intervention)
- max_life <- isolate(input$maxLifetime)
- therapeuticBenefitYears <- ifelse(!is.null(d$therapeuticBenefitYears), d$therapeuticBenefitYears, NA)
- linePlot_data <- d$linePlot_data
- if (is.null(linePlot_data)) {
- hc <- get_healthy_cells_fun(d$plot_data, input$HealthyCellCAG_Threshold)
- hcu <- get_healthy_cells_fun(d$plot_data_untreated, input$HealthyCellCAG_Threshold)
- hcm <- merge(hc, hcu, by = "Age")
- colnames(hcm) <- c("Age", "HealthyTreated", "HealthyUntreated")
- dc <- get_dead_cells_fun(d$plot_data)
- dcu <- get_dead_cells_fun(d$plot_data_untreated)
- dcm <- merge(dc, dcu, by = "Age")
- colnames(dcm) <- c("Age", "DeadTreated", "DeadUntreated")
- linePlot_data <- merge(hcm, dcm, by = "Age")
- }
- Predicted_AgeOfOnset <- GetPredAgeOfOnset(repeat_len)
- convertToTreated_fun <- function(x){
- if (!is.finite(x) || x >= max_life) return(max_life)
- selected_line <- linePlot_data[linePlot_data$Age == x,]
- if (nrow(selected_line) == 0) return(max_life)
- pctHealthUntreatedCells <- selected_line[3]
- selected_line_2 <- linePlot_data[linePlot_data$HealthyTreated >= pctHealthUntreatedCells[1,1],]
- if (nrow(selected_line_2) == 0) return(max_life)
- age <- max(selected_line_2$Age) + 1
- return(age)
- }
- # Use existing stage shading if available; otherwise skip background rectangles
- background_data_treated <- NULL
- if (!is.null(d$stage1_df) && !is.null(d$stage2_df) && !is.null(d$stage3_df)) {
- s1_start <- safe_min_age(d$stage1_df, max_life)
- s2_start <- safe_min_age(d$stage2_df, max_life)
- s3_start <- safe_min_age(d$stage3_df, max_life)
- background_data_treated <- data.frame(
- xmin = as.numeric(c(-Inf, convertToTreated_fun(s1_start), convertToTreated_fun(s2_start), convertToTreated_fun(s3_start))),
- xmax = as.numeric(c(convertToTreated_fun(s1_start), convertToTreated_fun(s2_start), convertToTreated_fun(s3_start), max_life)),
- ymin = rep(-Inf, 4),
- ymax = rep(Inf, 4),
- fill = factor(c("white", "lightgrey", "grey", "darkgrey"), levels = c("white", "lightgrey", "grey", "darkgrey"))
- )
- }
- line_plot <- ggplot(linePlot_data, aes(x = Age))
- if (!is.null(background_data_treated)) {
- line_plot <- line_plot +
- geom_rect(data = background_data_treated, aes(xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, fill = fill),
- alpha = 0.2, inherit.aes = FALSE)
- }
- line_plot <- line_plot +
- geom_line(aes(y = HealthyTreated, color = "healthy_treated"), linewidth = 1.2) +
- geom_line(aes(y = HealthyUntreated, color = "healthy_untreated"), linewidth = 1.2) +
- geom_vline(xintercept = intervention_age, color = "purple", linetype = "dashed") +
- annotate("text", x = intervention_age, y = 50, label = "Gene Therapy Administered",
- vjust = -1, hjust = 1, color = "purple", angle = 90) +
- geom_vline(xintercept = convertToTreated_fun(Predicted_AgeOfOnset), color = "purple", linetype = "dashed") +
- annotate("text", x = convertToTreated_fun(Predicted_AgeOfOnset), y = 50, label = "Motor Symptom Onset (CAP=100)",
- vjust = -1, hjust = 0.3, color = "purple", angle = 90) +
- scale_color_manual(
- values = c("healthy_treated" = "purple", "healthy_untreated" = "grey50"),
- labels = c("healthy_treated" = paste0("Healthy Cells (<", input$HealthyCellCAG_Threshold, ") treated"),
- "healthy_untreated" = paste0("Healthy Cells (<", input$HealthyCellCAG_Threshold, ") untreated"))
- ) +
- scale_fill_manual(name="HD-ISS Stages", values=c("white"="white", "lightgrey"="lightpink",
- "grey"="violet", "darkgrey"="purple"),
- labels=c("Stage 0", "Stage 1", "Stage 2", "Stage 3")) +
- labs(title="Percentage of Cells Over Time",
- subtitle=paste0(ifelse(input$modelMode == "handsaker", "Handsaker CTMC model", "Latus event-sampling model"),
- ifelse(is.na(therapeuticBenefitYears), "", paste0(" | Therapeutic Benefit = ", therapeuticBenefitYears, " years"))),
- x="Age", y="Percentage of cells", color="Cell Type") +
- theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
- panel.background = element_blank(), axis.line = element_line(colour = "black"))
- isolate({ renderState$linePlotDone <- TRUE })
- updateProgressBar(session, id = "pbRun", value = 90, title = "Rendering output plots...")
- stored_plots$linePlot <- line_plot
- return(line_plot)
- })
- # ============================================================================
- # Download Handlers
- # ============================================================================
- # --- Animation GIF ---
- output$download_animation_gif <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_animation.gif") },
- content = function(file) {
- d <- active_simulation_data()
- plot_data <- d$plot_data
- repeat_len <- input$germlineHDRepeatLength
- highlight <- input$highlightTransducedCells
- max_life <- input$maxLifetime
- model_title <- ifelse(input$modelMode == "handsaker",
- paste0("Handsaker CTMC model (p_exp = ", input$p_exp, ")"),
- "Latus event-sampling model")
- p <- make_repeat_animation(plot_data, model_title, repeat_len, highlight, max_life)
- anim_save(file, animate(p, nframes = max_life, fps = 4))
- }
- )
- # --- Animation underlying data (CSV) ---
- output$download_animation_csv <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_cell_data.csv") },
- content = function(file) {
- write.csv(active_simulation_data()$plot_data, file, row.names = FALSE)
- }
- )
- # --- Line Plot PNG ---
- output$download_linePlot_png <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_linePlot.png") },
- content = function(file) {
- ggsave(file, stored_plots$linePlot, width = 10, height = 7, dpi = 300)
- }
- )
- # --- Line Plot data (CSV) ---
- output$download_linePlot_csv <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_linePlot_data.csv") },
- content = function(file) {
- write.csv(active_simulation_data()$linePlot_data, file, row.names = FALSE)
- }
- )
- # --- Healthy Cells Plot PNG ---
- output$download_healthyPlot_png <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_healthyCells.png") },
- content = function(file) {
- ggsave(file, stored_plots$healthyPlot, width = 10, height = 7, dpi = 300)
- }
- )
- # --- Healthy Cells data (CSV) ---
- output$download_healthyPlot_csv <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_healthyCells_data.csv") },
- content = function(file) {
- write.csv(if (!is.null(active_simulation_data()$barplot_data_pct_healthy_cells_merged)) active_simulation_data()$barplot_data_pct_healthy_cells_merged else active_simulation_data()$healthy_cells, file, row.names = FALSE)
- }
- )
- # --- Run Configuration file ---
- output$download_config <- downloadHandler(
- filename = function() { paste0(get_file_prefix(), "_config.csv") },
- content = function(file) {
- config <- data.frame(
- Parameter = c(
- "Germline CAG Repeat Length",
- "Age at Intervention",
- "Max Lifetime",
- "MSH3 Knockdown Percentage",
- "Transduction Rate",
- "Number of MSNs Simulated",
- "Healthy Cell CAG Threshold",
- "Contraction Events per Cycle",
- "Expansion Events per Cycle",
- "Expansion:Contraction Ratio",
- "Phase 1 Threshold (T1)",
- "Phase 1 Rate (r1)",
- "Phase 2 Threshold (T2)",
- "Phase 2 Rate (r2)",
- "Cell Death Threshold (CAG)",
- "Timestamp"
- ),
- Value = c(
- input$germlineHDRepeatLength,
- input$age_at_intervention,
- input$maxLifetime,
- input$therapeuticModifier,
- input$transductionRate,
- input$nMSNs_CaudatePutamen,
- input$HealthyCellCAG_Threshold,
- input$n_contractions,
- input$n_expansions,
- paste0(input$n_expansions, ":", input$n_contractions),
- 33.5,
- 0.035,
- 55,
- 0.576,
- 300,
- format(Sys.time(), "%Y-%m-%d %H:%M:%S")
- )
- )
- write.csv(config, file, row.names = FALSE)
- }
- )
- }
server.r at commit b9de42a, no license · at the source
Overview
- Latus Bio, Philadelphia, PA USA
- Raymond G. Perelman Center for Cellular and Molecular Therapeutics, The Children’s Hospital of Philadelphia, Philadelphia, PA USA
- Department of Pathology and Laboratory Medicine, University of Pennsylvania, Philadelphia, PA USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 7 matches between paragraphs and lines of code.
LatusBio/HD_Model_NatComm_Publication
b9de42ac6f634d137f68e57b059caf08f9ef4d05, 28 October 2026Availability: 1 check, the latest on 30 October 2026: the link answers
- 30 October 2026: the link answers
5 files
Zenodo 22118021
Availability: 1 check, the latest on 30 October 2026: the link answers (HTTP 200)
- 30 October 2026: the link answers (HTTP 200)
5 files
Zenodo 22118020
Availability: 1 check, the latest on 30 October 2026: the link answers (HTTP 200)
- 30 October 2026: the link answers (HTTP 200)
5 files
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: LatusBio/
HD_Model_NatComm_Publica , Zenodo 22118021tion - it says that the code is available on request
Read it in the paper: doi.org/10.1038/s41467-026-78769-2.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 12 scripts, each with its path and the digest of its content;
- 7 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- geo:GSE338964, at NCBI GEO; found in “Data availability”
Data availability statement
The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: NCBI GEO GSE338964
- it says that the data are available on request
Read it in the paper: doi.org/10.1038/s41467-026-78769-2.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 October 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 17 authors, 3 keywords, 15 MeSH terms, 1 funder, 49 references.
Cite
This paper
Simpson, B. P., Ranum, P. T., Leib, D. E., Tecedor, L., Giovenco, R. C., Huerta-Ocampo, I., Hundley, A. A., Smith, N., Fluta, C. M., Cali, C. P., Benoit, J., Soper, J. C., Connelly, J., Yohrling, G. J., Ghoroghchian, P. P., Cha, J.-H. J., & Davidson, B. L. (2026). Computational modeling and preclinical evaluation support targeting somatic instability for Huntington's disease treatment. Nature communications, 17(1), 11036. https://
BibTeX
@article{simpson2026comp
author = {Simpson, Bryan P and Ranum, Paul T and Leib, David E and Tecedor, Luis and Giovenco, Ryan C and Huerta-Ocampo, Icnelia and Hundley, Amiel A and Smith, Noah and Fluta, Christopher M and Cali, Christopher P and Benoit, Jamie and Soper, Jenna C and Connelly, John and Yohrling, George J and Ghoroghchian, P Peter and Cha, Jang-Ho J and Davidson, Beverly L},
title = {{Computational modeling and preclinical evaluation support targeting somatic instability for Huntington's disease treatment}},
journal = {Nature communications},
year = {2026},
month = oct,
volume = {17},
number = {1},
pages = {11036},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42951910},
pmcid = {PMC13716904}
}
RIS
TY - JOUR
AU - Simpson, Bryan P
AU - Ranum, Paul T
AU - Leib, David E
AU - Tecedor, Luis
AU - Giovenco, Ryan C
AU - Huerta-Ocampo, Icnelia
AU - Hundley, Amiel A
AU - Smith, Noah
AU - Fluta, Christopher M
AU - Cali, Christopher P
AU - Benoit, Jamie
AU - Soper, Jenna C
AU - Connelly, John
AU - Yohrling, George J
AU - Ghoroghchian, P Peter
AU - Cha, Jang-Ho J
AU - Davidson, Beverly L
TI - Computational modeling and preclinical evaluation support targeting somatic instability for Huntington's disease treatment
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 11036
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Computational modeling and preclinical evaluation support targeting somatic instability for Huntington's disease treatment",
"container-title": "Nature communications",
"author": [
{
"family": "Simpson",
"given": "Bryan P"
},
{
"family": "Ranum",
"given": "Paul T"
},
{
"family": "Leib",
"given": "David E"
},
{
"family": "Tecedor",
"given": "Luis"
},
{
"family": "Giovenco",
"given": "Ryan C"
},
{
"family": "Huerta-Ocampo",
"given": "Icnelia"
},
{
"family": "Hundley",
"given": "Amiel A"
},
{
"family": "Smith",
"given": "Noah"
},
{
"family": "Fluta",
"given": "Christopher M"
},
{
"family": "Cali",
"given": "Christopher P"
},
{
"family": "Benoit",
"given": "Jamie"
},
{
"family": "Soper",
"given": "Jenna C"
},
{
"family": "Connelly",
"given": "John"
},
{
"family": "Yohrling",
"given": "George J"
},
{
"family": "Ghoroghchian",
"given": "P Peter"
},
{
"family": "Cha",
"given": "Jang-Ho J"
},
{
"family": "Davidson",
"given": "Beverly L"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "11036",
"DOI": "10.1038/
"PMID": "42951910",
"PMCID": "PMC13716904",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
10,
28
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.ajhg.2025.12.002 [code]
- MSH3 is a genetic modifier of somatic repeat instability in X-linked dystonia parkinsonism.Journal: American journal of human geneticsIn common: ggplot2, tidyverse, other condition, 12 references
- [2] doi:10.1016/j.ajhg.2024.04.015 [code]
- Therapeutic validation of MMR-associated genetic modifiers in a human ex vivo model of Huntington disease.Journal: American journal of human geneticsIn common: other condition, 13 references
- [3] doi:10.1073/pnas.2518854123
- Huntington's disease LIG1 modifier variant increases ligase fidelity and suppresses somatic CAG repeat expansion.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: other condition, mouse, 12 references
- [4] doi:10.1016/j.celrep.2025.116685 [code]
- A human CAGinSTEM platform for decoding HTT repeats' somatic instability links CAG interruption to HD pathology in neurons.Journal: Cell reportsIn common: ggplot2, tidyverse, other condition, 9 references
- [5] doi:10.1177/18796397261443137 [code]
- Towards AI-driven prediction of &
lt;i& gt;HTT& lt;/ i& gt; CAG size in super-expanded human spiny projection neurons from Huntington disease donors. Journal: Journal of Huntington's diseaseIn common: other condition, 10 references - [6] doi:10.1038/s41467-025-60000-3 [code]
- Optimized AAV capsids for basal ganglia diseases show robust potency and distribution.Journal: Nature communicationsIn common: reshape2, ggplot2, tidyverse, non-human primate, other condition, mouse, 3 references, author Luis Tecedor
- [7] doi:10.1242/dmm.052803
- Molecular features of a Huntington's disease knock-in minipig.Journal: Disease models & mechanismsIn common: other condition, 9 references
- [8] doi:10.1038/s41467-025-64485-w [code]
- Mechanism of trinucleotide repeat expansion by MutSβ-MutLγ and contraction by FAN1.Journal: Nature communicationsIn common: other condition, 9 references
- [9] doi:10.1093/braincomms/fcae418 [code]
- Genomic characterization of Huntington's disease genetic modifiers informs drug target tractability.Journal: Brain communicationsIn common: reshape2, ggplot2, tidyverse, other condition, 6 references
- [10] doi:10.1038/s41588-024-01653-6
- Cell-type-specific CAG repeat expansions and toxicity of mutant Huntingtin in human striatum and cerebellum.Journal: Nature geneticsIn common: other condition, 8 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 3 repositories of the authors' code, each at its verified commit and with its license, 12 scripts, and 7 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:b3d2eee08695475f…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-78769-2)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-78769-2.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-78769-2
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-78769-2"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-78769-2.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
