#!/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 my $cost_column="smooth_GDT"; my $negate_cost = 1; # negate GDT costs to make bigger be better # 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 $best; # best: first row excluding *.real.pdb, robetta*, or name # starting with a digit or starting with t2 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 1 : robetta-model1.pdb 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-model1.pdb/); $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)); $best=$cost if (!defined($best) && ($file !~ /robetta/ ) && ($file !~ /real/) && ($file !~ /^[1-9]/) && ($file !~ /^t2/) ); if (!defined($target) && $file =~/^(T[_0123456789]+)/) { $target = $1; } } $best_sub = "NA" if ! defined($best_sub); $model1 = "NA" if ! defined($model1); printf "#targ\tbest\tbestsub\tmodel1\tauto\talign\tbestrob\trobetta1\n"; printf "%-6s\t%7.4f\t%7.4f\t%7.4f\t%7.4f\t%7.4f\t%7.4f\t%7.4f\n", $target, $best, $best_sub, $model1, $auto, $align1, $best_robetta, $robetta1;