#!/usr/bin/perl -w # summarize-evaluation < decoys/evaluate.rdb > evaluation.summary # extracts interesting results from the evaluate.rdb file and puts # them in a tabular format # options: # -cost real_cost name of column to extract # Assumes input sorted on this column # -negate Set if you want bigger is better, # rather than costs use Getopt::Long; my $wd = `pwd`; my $cost_column="real_cost"; my $negate_cost = 0; # negate GDT costs to make bigger be better GetOptions( "cost=s" => \$cost_column , "negate!" =>\$negate_cost ); # look for column names my @col_names; while () { next if /^\s*#/; chomp; @col_names = split(/\t/); last; } my %col_number; for(my $i=0; $i; # skip field-width info # values desired in output my $target; # target: target name my $our_best; # our best: first row containing "try\d" my $best_sub; # best-submitted: first row containing ts-submitted my $model1; # model1 : model1.ts-submitted my $auto; # automatic : *.try1-opt2.pdb my $align1; # alignment : align1 my $best_robetta; # best Robetta : first row containing robetta* my $robetta1; # Robetta_TS1 my $best_zhang; # best Zhang-Server my $zhang1; # Zhang-Server_TS11 my $best_server; # best not starting with digit, not containing # ts-submitted, try\d, or -scwrl my $sam_t06_server; # SAM_T06_server_TS1 my $sam_t02; # SAM-T02_AL1-scwrl my $sam_t99; # SAM-T99_AL1-scwrl while() { chomp; my @cols = split(/\t/); my $file = $cols[0]; my $cost = $cols[$cost_col_num]; $cost = 0-$cost if $negate_cost; next if ! defined($cost); $best_robetta=$cost if ($file =~ /ROBETTA/ && !defined($best_robetta)); $robetta1=$cost if ($file =~ /ROBETTA_TS1$/); $best_zhang=$cost if ($file =~ /Zhang-Server/) && !defined($best_zhang); $zhang1=$cost if ($file =~ /Zhang-Server_TS1$/); $sam_t06_server=$cost if ($file =~ /SAM_T06_server_TS1$/); $sam_t02=$cost if ($file =~ /SAM-T02_AL1-scwrl/); $sam_t99=$cost if ($file =~ /SAM-T99_AL1-scwrl/); $align1=$cost if ($file =~ /align1/); $auto=$cost if ($file =~ /try1-opt2.pdb/); $model1=$cost if ($file =~ /model1.ts-submitted/); $best_sub=$cost if ($file =~ /ts-submitted/ && !defined($best_sub)); $our_best=$cost if (!defined($our_best) && ( $file =~ /try\d/ || $file =~ /ts-submitted\d/ || $file =~ /align\d/ )); $best_server = $cost if (!defined($best_server) && $file !~ /try\d/ && $file !~ /ts-submitted/ && $file !~ /-scwrl$/ && $file !~ /align\d$/ && $file !~ /^\s*\d....$/ && $file !~ /^\s*tr\d\d\d/ && $file !~ /[.]real[.]pdb/ ); if (!defined($target) && $file =~/^\s*(T[_0123456789]+)/) { $target = $1; } } if (! defined($target)) { die "Can't find a target result in the evaluation file"; } printf "#targ\tourbest\tbestsub\tmodel1\tauto\talign\tsamt06\tsamt02\tsamt99\tbestrob\trob1\tbestzh\tzhang1\tbestsrv\n"; printf "%-6s", $target; if (defined($our_best)) {printf "\t%7.4f", $our_best;} else {print"\tNA";}; if (defined($best_sub)) {printf "\t%7.4f", $best_sub;} else {print"\tNA";}; if (defined($model1)) {printf "\t%7.4f", $model1;} else {print"\tNA";}; if (defined($auto)) {printf "\t%7.4f", $auto;} else {print"\tNA";}; if (defined($align1)) {printf "\t%7.4f", $align1;} else {print"\tNA";}; if (defined($sam_t06_server)) {printf "\t%7.4f", $sam_t06_server;} else {print"\tNA";}; if (defined($sam_t02)) {printf "\t%7.4f", $sam_t02;} else {print"\tNA";}; if (defined($sam_t99)) {printf "\t%7.4f", $sam_t99;} else {print"\tNA";}; if (defined($best_robetta)) {printf "\t%7.4f", $best_robetta;} else {print"\tNA";}; if (defined($robetta1)) {printf "\t%7.4f", $robetta1;} else {print"\tNA";}; if (defined($best_zhang)) {printf "\t%7.4f", $best_zhang;} else {print"\tNA";}; if (defined($zhang1)) {printf "\t%7.4f", $zhang1;} else {print"\tNA";}; if (defined($best_server)) {printf "\t%7.4f", $best_server;} else {print"\tNA";}; print "\n";