Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/perl | ||
|
||
use FindBin; | ||
use lib $FindBin::Bin; | ||
use strict ; | ||
|
||
#print @ARGV ; | ||
|
||
my $rdc="nhn.tab"; | ||
|
||
my $total ; | ||
my $i ; | ||
my $outD ; | ||
my $pdbf ; | ||
|
||
my $pdb = $ARGV[0] ; | ||
my $total = $ARGV[1] ; | ||
$pdb =~ s/\.pdb// ; | ||
|
||
open(S,">$pdb.script") ; | ||
print(S "load pdb $pdb.pdb\n"); | ||
print(S "to xplor\n"); | ||
print(S "split $pdb\n"); | ||
print(S "quit\n"); | ||
close(S); | ||
system("/opt/software/bin/pdbstat -s < $pdb.script > $pdb.script.out"); | ||
system("rm *Axis*"); | ||
my $id ; | ||
|
||
my $Da_HN ; | ||
my $Q ; | ||
my $Rhomb ; | ||
my $RMS ; | ||
my $t1 ; | ||
my $t2 ; | ||
|
||
open(OU,">DC_Summary"); | ||
print(OU " Da_HN Rhomb Q RMS \n"); | ||
print(OU " ======= ====== ====== ===== \n"); | ||
for ($i = 1; $i <= $total; $i++ ) { | ||
if ( $i < 10 ) { | ||
$id = "0$i" ; | ||
} else { | ||
$id = "$i" ; | ||
} | ||
$pdbf = $pdb . "_" . $i . ".pdb" ; | ||
$outD = $pdb . "_" . $id . "_" . $rdc . "_out" ; | ||
system("/Users/tejerr/bin/DC -pdb $pdbf -inD $rdc -outD $outD") ; | ||
open(F,"<$outD"); | ||
while ( <F> ) { | ||
next if $_ !~ /DATA Q_FAC|DATA Da_HN|DATA Rhomb|DATA RMS/ ; | ||
($t1,$t2,$RMS) = split(' ',$_) if ( $_ =~ /RMS/ ); | ||
($t1,$t2,$Q) = split(' ',$_) if ( $_ =~ /Q_FACT/ ); | ||
($t1,$t2,$Da_HN) = split(' ',$_) if ( $_ =~ /Da_HN/ ); | ||
($t1,$t2,$Rhomb) = split(' ',$_) if ( $_ =~ /Rhomb/ ); | ||
} | ||
print(OU " $Da_HN $Rhomb $Q $RMS \n") ; | ||
close($outD); | ||
} | ||
exit ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/perl | ||
|
||
use FindBin; | ||
use lib $FindBin::Bin; | ||
use strict ; | ||
|
||
my $inD = $ARGV[0] ; | ||
my @family = (); | ||
|
||
open(F,"<$inD") ; | ||
while ( <F> ) { | ||
next if ($_ =~ /^\s*$/); | ||
next if ($_ =~ /Media/) ; | ||
s/\[|\]//g ; | ||
my @spl = split(' ', $_); | ||
push(@family, [$spl[12],$spl[6], $spl[7]]); | ||
} | ||
close(F); | ||
my $i = 0; | ||
foreach my $l (@family) { | ||
$i++ ; | ||
print(" @$l " ); | ||
#foreach (@$l) { | ||
# print(" $_") ; | ||
#} | ||
print("\n"); | ||
} | ||
|
||
exit ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/perl | ||
|
||
use FindBin; | ||
use lib $FindBin::Bin; | ||
use strict ; | ||
|
||
my $outD = $ARGV[0] ; | ||
|
||
my $Da_HN ; | ||
my $Q ; | ||
my $Rhomb ; | ||
my $RMS ; | ||
my $t1 ; | ||
my $t2 ; | ||
|
||
open(OU,">DC_Summary"); | ||
print(OU " Da_HN Rhomb Q RMS \n"); | ||
print(OU " ======= ====== ====== ===== \n"); | ||
open(F,"<$outD"); | ||
while ( <F> ) { | ||
next if $_ !~ /DATA Q_FAC|DATA Da_HN|DATA Rhomb|DATA RMS/ ; | ||
($t1,$t2,$RMS) = split(' ',$_) if ( $_ =~ /RMS/ ); | ||
($t1,$t2,$Q) = split(' ',$_) if ( $_ =~ /Q_FACT/ ); | ||
($t1,$t2,$Da_HN) = split(' ',$_) if ( $_ =~ /Da_HN/ ); | ||
($t1,$t2,$Rhomb) = split(' ',$_) if ( $_ =~ /Rhomb/ ); | ||
} | ||
print(OU " $Da_HN $Rhomb $Q $RMS \n") ; | ||
close($outD); | ||
exit ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
|
||
my $rpf = $ARGV[0] ; | ||
my @recall_s ; | ||
my @precision_s ; | ||
my @fmeasure_s ; | ||
my @dp_s ; | ||
my $i = 0 ; | ||
|
||
my $recsum = 0 ; | ||
my $precsum = 0 ; | ||
my $fmsum = 0 ; | ||
my $dpsum = 0 ; | ||
|
||
# extract and write out RPF scores | ||
if (open(SF, "<$rpf")) { | ||
my ($recall_n, $precision_n, $f_measure_n, $dp_score_n) = (0, 0, 0, 0); | ||
while (my $line_s = <SF>) { | ||
next if $line_s !~ (/input query structures:/ || /DP-Score:/); | ||
if ($line_s =~ /Final Recall-score for input query structures:\s*(\S+)/) { | ||
$recall_n = sprintf "%.3f", $1; | ||
push(@recall_s, $recall_n); | ||
} elsif ($line_s =~ /Final Precision-score for input query structures:\s*(\S*)/) { | ||
$precision_n = sprintf "%.3f", $1; | ||
push(@precision_s, $precision_n); | ||
} elsif ($line_s =~ /F-score of input query structures:\s*(\S+)/) { | ||
$f_measure_n = $1; | ||
push(@fmeasure_s, $f_measure_n); | ||
} elsif ($line_s =~ /DP-Score:\s*(\S+)/) { | ||
$dp_score_n = sprintf "%.3f", $1; | ||
push(@dp_s, $dp_score_n); | ||
} | ||
} | ||
close(SF); | ||
# print "Recall: $recall_n, Precision: $precision_n, F-measure: $f_measure_n, DP-Score: $dp_score_n \n" ; | ||
#print " Recall Precision F-measure DP-Score \n" ; | ||
print " R P F DP \n" ; | ||
foreach (@dp_s) { | ||
printf " %7.3f %7.3f %7.3f %7.3f \n", $recall_s[$i], $precision_s[$i], $fmeasure_s[$i], $dp_s[$i] ; | ||
$i++ ; | ||
} | ||
|
||
} | ||
exit ; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
|
||
my $rpf = $ARGV[0] ; | ||
my @recall_s ; | ||
my @precision_s ; | ||
my @fmeasure_s ; | ||
my @dp_s ; | ||
my $i = 0 ; | ||
|
||
my $recsum = 0 ; | ||
my $precsum = 0 ; | ||
my $fmsum = 0 ; | ||
my $dpsum = 0 ; | ||
|
||
# extract and write out RPF scores | ||
if (open(SF, "<$rpf")) { | ||
my ($recall_n, $precision_n, $f_measure_n, $dp_score_n) = (0, 0, 0, 0); | ||
while (my $line_s = <SF>) { | ||
next if $line_s !~ (/input query structures:/ || /DP-Score:/); | ||
if ($line_s =~ /Final Recall-score for input query structures:\s*(\S+)/) { | ||
$recall_n = sprintf "%.3f", $1; | ||
push(@recall_s, $recall_n); | ||
} elsif ($line_s =~ /Final Precision-score for input query structures:\s*(\S*)/) { | ||
$precision_n = sprintf "%.3f", $1; | ||
push(@precision_s, $precision_n); | ||
} elsif ($line_s =~ /F-score of input query structures:\s*(\S+)/) { | ||
$f_measure_n = $1; | ||
push(@fmeasure_s, $f_measure_n); | ||
} elsif ($line_s =~ /DP-Score:\s*(\S+)/) { | ||
$dp_score_n = sprintf "%.3f", $1; | ||
push(@dp_s, $dp_score_n); | ||
} | ||
} | ||
close(SF); | ||
# print "Recall: $recall_n, Precision: $precision_n, F-measure: $f_measure_n, DP-Score: $dp_score_n \n" ; | ||
print " Recall Precision F-measure DP-Score \n" ; | ||
foreach (@dp_s) { | ||
print " $recall_s[$i] $precision_s[$i] $fmeasure_s[$i] $dp_s[$i] \n" ; | ||
$i++ ; | ||
} | ||
|
||
} | ||
exit ; | ||
|
||
|