#!/usr/local/bin/perl ($n, $workdir, $target) = @ARGV; $count = 0; %FSSPRepHash = (); %SCOPDomainHash = (); while($line = ){ #allow for two extra counts for the col names and defs last if $count == ($n+2); chomp $line; @cols = split(" ", $line); #handy guide to the columns # $cols[0] pw.a2m.gz file name # $cols[1] evalue # $cols[2] fssp rep # $cols[3] domain #we will print the top $n different hits where #Two hits are different if they have different SCOP #superfamilies or different FSSP representatives. if ( !(($FSSPRepHash{$cols[2]} == 1) || ($SCOPDomainhash{$cols[3]} == 1 ))) { print "$line\n"; $count++; } $FSSPRepHash{$cols[2]} = 1; $SCOPDomainHash{$cols[3]} = 1; }