From d54ec7478fe938ec0c67f97220e078c5e43c5396 Mon Sep 17 00:00:00 2001 From: Petr Smirnov Date: Fri, 26 May 2023 13:13:50 +0200 Subject: [PATCH] avoiding making same indexing mistake as I jusst fixed a few lines below (1:0) --- workflow/scripts/plotting/plot-sv-calls_dev.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/scripts/plotting/plot-sv-calls_dev.R b/workflow/scripts/plotting/plot-sv-calls_dev.R index 0dc8620c..c600d20f 100644 --- a/workflow/scripts/plotting/plot-sv-calls_dev.R +++ b/workflow/scripts/plotting/plot-sv-calls_dev.R @@ -363,7 +363,7 @@ if (!is.null(f_segments)) { seg <- - merge(seg, bins[, .N, by = chrom][, .(chrom, N = c(0, cumsum(N)[1:(.N - 1)]))], by = "chrom") + merge(seg, bins[, .N, by = chrom][, .(chrom, N = c(0, cumsum(N)[- .N]))], by = "chrom") # print(c(1, bps[1:(.N - 1)] + 1)) # print(bps)