!#/usr/bin/perl -w
#perl sort_result.pl live_wo_di1-di2-tri-arch_E1e-2.csv > live_wo_di1-di2-tri-arch_E1e-2-sorted.csv

@nono;
@noyes;
@yesno;
@yesyes;

open(IN,$ARGV[0]);
while(<IN>) {
    if ($_ =~ /^([^;]+);([^;]+)/ ) {
        if ($1 eq "no" && $2 eq "no") {
            push(@nono, $_);
        }
        if ($1 eq "no" && $2 eq "yes") {
            push(@noyes, $_);
        }
        if ($1 eq "yes" && $2 eq "no") {
            push(@yesno, $_);
        }
        if ($1 eq "yes" && $2 eq "yes") {
            push(@yesyes, $_);
        }
    }
}
print"UNG (EV=0.01);UGI or SAUGI or P56 (EV=0.01);Genome directory name;Acc number;Sequence name;Acc number;Sequence name\n";
print @yesyes;
print @yesno;
print @noyes;
print @nono;
close IN;
