#!/usr/local/bin/perl # Report which are the positive and negative influenced amino acids. $docyc=1; $dohyd=1; $doala=1; $dolms=1; $dobur=1; # How to override min and max values with command line eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; $pstring = ""; $mstring = ""; print "ACDEFGHIKLMNPQRSTVWY\n" ; $i = 0 ; while( ( $_ = <> ) ) { $i ++ ; s/^\s*//; ( $b , $w ) = split ; if ( $b > 0.0 ) { if ( $w > 0.0 ) { $this="O"; $pstring=$pstring.$this ; $mstring=$mstring." " ; } else { $this = "X" ; $pstring .= " " ; $mstring .= $this ; } } else { $mstring=$mstring." " ; $pstring=$pstring." " ; $this = " " ; } $thestring=$thestring.$this ; $t[$i] = $this ; if ( $i >= 20 ) { &doit ( ) ; $i = 0 ; # print $pstring, "\n" ; # print $mstring, "\n" ; print $thestring, " " , $cyclic , " " , $hydro , " " , $alacba , " " ,$lms , " ", $buried, "\n" ; $thestring = ""; $pstring = ""; $mstring = ""; } } $thestring = "ACDEFGHIKLMNPQRSTVWY" ; $t[1] = "A"; $t[2] = "C"; $t[3] = "D"; $t[4] = "E"; $t[5] = "F"; $t[6] = "G"; $t[7] = "H"; $t[8] = "I"; $t[9] = "K"; $t[10] = "L"; $t[11] = "M"; $t[12] = "N"; $t[13] = "P"; $t[14] = "Q"; $t[15] = "R"; $t[16] = "S"; $t[17] = "T"; $t[18] = "V"; $t[19] = "W"; $t[20] = "Y"; &doit () ; print $thestring, " " , $cyclic , " " , $hydro , " " , $alacba , " " ,$lms , " ", $buried, "\n" ; sub doit { # $cyclic = ($docyc)?"|".$t[5].$t[7].$t[13].$t[19].$t[20]."-CYCLIC-".$t[1].$t[2].$t[3].$t[4].$t[6].$t[8].$t[9].$t[10].$t[11].$t[12].$t[14].$t[15].$t[16].$t[17].$t[18]."|" : ""; $hydro = ($dohyd)?"|".$t[5].$t[1].$t[18].$t[6].$t[8].$t[11].$t[10].$t[13].$t[19].$t[20]."-HYDROPHOBIC-".$t[2].$t[3].$t[4].$t[7].$t[9].$t[12].$t[14].$t[15].$t[16].$t[17]."|" : ""; $buried = ($dobur)?"|".$t[5].$t[1].$t[2].$t[19].$t[18].$t[11].$t[10].$t[8]."-BURIED-".$t[6].$t[20].$t[13].$t[3].$t[4].$t[7].$t[9].$t[12].$t[14].$t[15].$t[16].$t[17]."|" : ""; $alacba = ($doala)? "|".$t[6].$t[1].$t[8].$t[10].$t[18]."-ALIPH-".$t[3].$t[4]."-AC-".$t[15].$t[9].$t[7]."-BA-".$t[2].$t[5].$t[11].$t[17].$t[14].$t[12].$t[13].$t[16].$t[20].$t[19]."|" : ""; $lms = ($dolms)?"|".$t[4].$t[9].$t[7].$t[8].$t[11].$t[5].$t[10].$t[15].$t[19].$t[14].$t[20]."-L-".$t[3].$t[12].$t[2].$t[18].$t[17].$t[13]."-M-".$t[16].$t[1].$t[6]."|" : ""; }