invivo = []
f1 = open('literature_invivo.txt')
for line in f1:
    line = line.strip().split('\t')
    invivo.append((line[0], line[1]))


other_evi = set()
f3 = open('no_phage_array.processed')
for line in f3:
    line = line.strip().split()
    other_evi.add((line[0], line[1]))
    other_evi.add((line[1], line[0]))

#r1 = open('positive_semi5_other_evi1.txt', 'w')
#r2 = open('positive_train.txt.filtered.other.evi', 'w')

f2 = open('positive_train.txt.filtered')
count = 0
c = 0
for line in f2:
    line = line.strip().split()
    if (line[0], line[1]) in invivo:
        c += 1
        continue
    elif (line[0], line[1]) in other_evi:
        #r2.write("\t".join(line) + '\n')
        #r1.write(line[0] + '\t' + line[1] + '\t' + '\t'.join(line[5:]) + '\n')
        count += 1

print count
print c

