From 938f5d4afc6323d3023e977ce75a382b7f3f4aad Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 7 Aug 2012 14:18:17 -0400 Subject: [PATCH] make --reverse option work Signed-off-by: Galen Charlton --- extract_loadset | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extract_loadset b/extract_loadset index 07d3a3a..aa29023 100755 --- a/extract_loadset +++ b/extract_loadset @@ -32,11 +32,7 @@ while () { chomp; my ($lead,$sub) = split /\t/; $sub =~ s/\s//g; # any whitespace is extraneous - if ($conf->{reverse}) { - $exclude{$lead} = 1 unless ($lead < $conf->{lowerbound}); - } else { - $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound}); - } + $exclude{$sub} = 1 unless ($sub < $conf->{lowerbound}); } close FP; @@ -45,7 +41,11 @@ open MI, '<', $conf->{input} or die "Can't open input file: $!\n"; open MO, '>', $conf->{output} or die "Can't open output file: $!\n"; while () { m/tag="$conf->{tag}".+?(\d+){reverse}) { + print MO if $exclude{$1}; + } else { + print MO unless $exclude{$1}; + } } -- 1.7.2.5