From 96efc463da90b5f26c8ea9a27f7b4182617c076a Mon Sep 17 00:00:00 2001 From: Schultheis Date: Tue, 4 Dec 2018 12:54:27 +0100 Subject: [PATCH] remove sequences below threshold (not above) --- bin/reduce_bed.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/reduce_bed.R b/bin/reduce_bed.R index cfa9766..d73fb94 100644 --- a/bin/reduce_bed.R +++ b/bin/reduce_bed.R @@ -54,7 +54,7 @@ reduce_bed <- function(input, kmer = 10, motif = 10, output = "reduced.bed", thr # remove sequences below minimum length total_rows <- nrow(bed_table) - bed_table <- bed_table[nchar(sequence) < min_seq_length] + bed_table <- bed_table[nchar(sequence) > min_seq_length] if (total_rows > nrow(bed_table)) { message("Removed ", total_rows - nrow(bed_table), " sequence(s) below minimum length of ", min_seq_length) }