summaryrefslogtreecommitdiff
path: root/tsv-exclude
blob: e951ea1950d021af191a3fa7af7b49094bb8c660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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