From 3336c931ec59e15375c5a1524d55f9be9187acc3 Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Wed, 13 Sep 2023 16:52:56 -0500 Subject: [PATCH] bugfix for empty clones --- DESCRIPTION | 4 ++-- R/draw.R | 6 +++++- R/zzz.R | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 991e175..43afe44 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: fishplot Title: Visualize the evolution of populations of cells over time -Version: 0.5.1 +Version: 0.5.2 Author: Chris Miller Description: Creates timecourse "fish plots" that show changes in the clonal architecture of a population. @@ -13,4 +13,4 @@ Imports: png, Hmisc RoxygenNote: 7.1.1 -Packaged: 2017-04-27 04:18:11 PM; cmiller +Packaged: 2023-08-13 04:48:11 PM; cmiller diff --git a/R/draw.R b/R/draw.R index 653a29c..1f6e563 100644 --- a/R/draw.R +++ b/R/draw.R @@ -110,7 +110,11 @@ drawClustBezier <- function(xpos, ytop, ybtm, color, nest.level, pad.left=0, drawClustSpline <- function(xpos, ytop, ybtm, color, nest.level, pad.left=0, border=1, col.border=NULL, annot="", annot.angle, annot.col, annot.cex, annot.pos, annot.offset){ - + + if(length(xpos)==0){ + print("skipping all-zero cluster with nothing to plot") + return() + } ##the flank value is used to add extra control points ##to the L and R of each real point, which helps to anchor the ##curves more firmly to the actual numbers diff --git a/R/zzz.R b/R/zzz.R index 1e578c1..83cd640 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -22,5 +22,5 @@ } .onAttach <- function(libname, pkgname) { - packageStartupMessage("Using fishPlot version 0.5.1") + packageStartupMessage("Using fishPlot version 0.5.2") }