From 822e4df325df61cf5bdd67478e660455ab385fa1 Mon Sep 17 00:00:00 2001 From: Markus Riester Date: Wed, 24 Apr 2024 14:43:56 -0400 Subject: [PATCH 1/2] 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) From 37f0097a34030cd46a9c98d484a9700d57ce4a24 Mon Sep 17 00:00:00 2001 From: Markus Riester Date: Wed, 24 Apr 2024 14:47:05 -0400 Subject: [PATCH 2/2] Attempt in fixing #363. --- R/segmentationCBS.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/segmentationCBS.R b/R/segmentationCBS.R index 9a8f9d5..40f8e42 100644 --- a/R/segmentationCBS.R +++ b/R/segmentationCBS.R @@ -436,7 +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) + perm <- min(length(weights), perm) num_marks <- sort(unique(seg$num.mark)) .do_permutation <- function(i, l) { if (l > 25) return(0)