#!/usr/bin/perl -w # evaluate-scwrl < decoys/evaluate.rdb > scwrl.summary # extracts all-atom rmsd results from evaluate.rdb, # pairing scwrl files with the unscwrled versions. use strict; my $cost_column="rmsd"; my $negate_cost = 0; # 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 %rmsd_no_scwrl; my %rmsd_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); if ($file =~ /^(\S*)-scwrl/) { $rmsd_scwrl{$1} = $cost; } elsif ($file =~ /^(\S*).pdb/) { $rmsd_no_scwrl{$1} = $cost; } } printf "#file\trmsd\trmsd_scwrl\n"; foreach my $key (keys(%rmsd_scwrl)) { my $no_scwrl_cost = $rmsd_no_scwrl{$key}; printf "%-25s\t%7.4f\t%7.4f\n", $key, $no_scwrl_cost, $rmsd_scwrl{$key} if defined($no_scwrl_cost); }