From c40f67d8eb1a47c15e7cdab3e74f0e9eb56bcf0f Mon Sep 17 00:00:00 2001 From: Luan Nguyen Date: Tue, 10 Dec 2024 10:21:14 +1100 Subject: [PATCH] Purple: Cast subclonalLikelihood to numeric in clonality_plot() --- purple/src/main/resources/r/somaticVariantPlots.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/purple/src/main/resources/r/somaticVariantPlots.R b/purple/src/main/resources/r/somaticVariantPlots.R index 4df438fd89..ffe43fec4e 100644 --- a/purple/src/main/resources/r/somaticVariantPlots.R +++ b/purple/src/main/resources/r/somaticVariantPlots.R @@ -33,7 +33,8 @@ clonality_plot <- function(somaticBuckets, clonalityModel) { summarise( isSubclonal = T, bucketWeight = sum(bucketWeight), - subclonalLikelihood = ifelse(bucketWeight == 0, 0, bucketWeight / max(totalWeight))) + subclonalLikelihood = as.numeric(ifelse(bucketWeight == 0, 0, bucketWeight / max(totalWeight))) + ) nonResidualModel = clonalityModel %>% filter(peak != 0) @@ -44,7 +45,7 @@ clonality_plot <- function(somaticBuckets, clonalityModel) { summarise( isSubclonal = T, bucketWeight = sum(bucketWeight), - subclonalLikelihood = ifelse(bucketWeight == 0, 0, bucketWeight / max(totalWeight))) + subclonalLikelihood = as.numeric(ifelse(bucketWeight == 0, 0, bucketWeight / max(totalWeight)))) combinedModel = nonResidualModel %>% group_by(bucket) %>%