From 822e4df325df61cf5bdd67478e660455ab385fa1 Mon Sep 17 00:00:00 2001 From: Markus Riester Date: Wed, 24 Apr 2024 14:43:56 -0400 Subject: [PATCH] Attempt in fixing #363. --- R/segmentationCBS.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/segmentationCBS.R b/R/segmentationCBS.R index e0c24f0..9a8f9d5 100644 --- a/R/segmentationCBS.R +++ b/R/segmentationCBS.R @@ -436,6 +436,7 @@ plot.cnv = TRUE, max.segments = NULL, min.logr.sdev = 0.15, chr.hash = chr.hash) } .getAverageWeightPV <- function(seg, weights, perm = 2000) { + perm <- min(length(weights), 2000) num_marks <- sort(unique(seg$num.mark)) .do_permutation <- function(i, l) { if (l > 25) return(0)