use strict; use Time::HiRes; my $start_time = [Time::HiRes::gettimeofday()]; my (@coordinates,%hash_chr,%HOA,%HOH,%hash_line) = (); open FILE,"GmGm.recent.gff"; while(my $line=){ chomp $line; my %seen = (); if($line=~/^(Gm\d{1,})\trecent_duplication\tsyntenic_region\t(\d{1,})\t(\d{1,})\t.*\tID\=\w{1,}_Gm\d{1,}\.(Gm\d{1,}.*)\;median_Ks=(.*)\;matches\=(Gm\d{1,}\:\d{1,}\.\.\d{1,})/) { my $chr1 = "$1:$2..$3"; my $ks_val = $5; my $chr2 = $6; if ((exists $hash_chr{$chr2})&&($ks_val > 0.4)){ next; } else{ $hash_chr{$chr1}=$chr2; } } } close FILE;