#!/usr/bin/perl



#169lA00 d169la_ d.2.1.3 1 10 530 40
# CATHname  SCOPname  SCOPnum  CATHnumbers
open(DICT,"/home/jairo/bio/ScoreTest/cath_scop_5105");


while (<DICT>) {
 #   chop();
  @line=split(/[\s.]/);
  $scop{$line[1]}=$line[2].".".$line[3];
  $cath{$line[1]}=$line[6].".".$line[7].".".$line[8];
}
close(DICT);

#foreach $key (keys %scop) {
#        print $key," ", $scop{$key}, "\n";
#}
#foreach $key (keys %cath) {
#        print $key," ", $cath{$key}, "\n";
#}


open(LIST,$ARGV[0]);

while (<LIST>) {
  @line=split(/\s+/);
  if ( ($scop{$line[0]} eq $scop{$line[1]}) || ($cath{$line[0]} eq $cath{$line[1]}) ) {
  }
  else {
    print $_;
  }
}
close(LIST);


