use strict;
use warnings;


my $PAT = $ARGV[0];
open(FILE,"<conserved.exonunits.mrna.aug03.internal.relabeled2") || die;
my ($humanidtmp,$mouseidtmp,$label);

while(<FILE>) {
    chomp;
    if (/^>/) {
	my $line = $_;
	$line =~ s/\>//g;
	($humanidtmp,$mouseidtmp,$label) = split(/\t/,$line);
	
    }
    elsif (/^G/ || /^A/) {
	my $seq = $_;
	my ($humanseq,$mouseseq) = split(/\s/,$seq);
	my ($humanupint,$humanexon,$humandnint) = split("X",$humanseq);
	my ($mouseupint,$mouseexon,$mousednint) = split("X",$mouseseq);
	if ($humanexon && $mouseexon && $mousednint && $mouseupint && $humanupint && $mouseupint && length($humandnint)>50 && length($mousednint)>50) {
	    if (substr($humandnint,0,2) eq 'GT' && substr($mousednint,0,2) eq 'GT' && length($humanexon) <=250 && length($mouseexon) <= 250) {
		if ($humanexon =~ /$PAT/) { 
		    ## DO SOMETHING
		    
		    
		}
	    }
	}
    }
}


