#
# For turning known operons into lists of pairs
use strict;
my $tuId = "";
my $first = -1;
my $last = -1;
print "tuId\tFirst\tLast\n";
while(<>)
{
    $_ =~ s/[\r\n]+//;
    my ($tuIdN,$firstN,$lastN) = split/\t/;
    next if $tuIdN eq "tuId";
    if($firstN > $last) {
	print "$tuId\t$first\t$last\n" if $first >= 0;
	$first = $firstN;
	$last = $lastN;
	$tuId = $tuIdN;
    } else {
	$last = $lastN if $lastN > $last;
	$tuId .= "X";
    }
}
print "$tuId\t$first\t$last\n";

