Skip to content

Commit

Permalink
Purple: Cast subclonalLikelihood to numeric in clonality_plot()
Browse files Browse the repository at this point in the history
  • Loading branch information
luan-n-nguyen committed Dec 9, 2024
1 parent c90e65a commit c40f67d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions purple/src/main/resources/r/somaticVariantPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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) %>%
Expand Down

0 comments on commit c40f67d

Please sign in to comment.