($in,$out)=@ARGV;
open IN,"$in";
open OUT,">$out";
while(chomp($line=<IN>)){
	@tmp=split(" ",$line);
	$seq=$tmp[4];
    $start=$tmp[5];
    $end=$tmp[6];
    $length=$end-$start+1;
	$family=$tmp[9];
    $class=$tmp[10];
		foreach($start..$end){
			$id=$seq."_".$_;
			$hash_family{$id}=$family;
		}
}
foreach(keys(%hash_family)){
	$family=$hash_family{$_};
	$hash_count{$family}++;
}
foreach(keys(%hash_count)){
	print OUT "$_\t$hash_count{$_}\n";
}
