diff --git a/generalHelpers.R b/generalHelpers.R index 579b455..622625c 100644 --- a/generalHelpers.R +++ b/generalHelpers.R @@ -120,8 +120,16 @@ gc_and_sample_size_normalise <- function(info, coverages, averageCoverage=T, all gcs <- info[,4] uniques_gcs <- unique(gcs) uniquesGcsToExclude = c() + empricial_criterion_for_exclusion = 25 + if (nrow(coverages) > 10000) { + empricial_criterion_for_exclusion = 50 + } + if (nrow(coverages) > 100000) { + empricial_criterion_for_exclusion = 100 + } + for (i in 1:length(uniques_gcs)) { - if (length(which(gcs == uniques_gcs[i])) < 25) { + if (length(which(gcs == uniques_gcs[i])) < empricial_criterion_for_exclusion) { uniquesGcsToExclude = c(uniquesGcsToExclude, i) } }