diff options
Diffstat (limited to 'tsv-exclude')
-rwxr-xr-x | tsv-exclude | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tsv-exclude b/tsv-exclude new file mode 100755 index 0000000..e951ea1 --- /dev/null +++ b/tsv-exclude @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby + +require 'zipf' +require 'set' + +to_exclude0 = {} +to_exclude1 = {} +f = ReadFile.new ARGV[0] + +while line = f.gets + p0, p1 = line.strip.split "\t" + to_exclude0[p0] = true + to_exclude1[p1] = true +end + +while line = STDIN.gets + p0, p1 = line.strip.split "\t" + if not to_exclude0.has_key? p0 and not to_exclude1.has_key? p1 + puts line + end +end |