1. Helix
Program to Identify helix
regions from the o/p file of the program PSW.
This is the input file for Helidata
j=1
n=`cat $i | wc | awk '{print $1}'`
echo $n
until [ $j -gt $n ]
do
head -$j $i | tail -1 > temp
a=`cat temp | cut -c35-37`
echo $a
if [ $a = H ]
then
b=H
until [ $b != H ]
do
head -$j $i | tail -1 >> $i.hel
head -$j $i | tail -1 > temp2
b=`cat temp2 | cut -c35-37`
j=`expr $j + 1`
if [ $j -eq $n ]
then
exit
fi
done
head -$j $i | tail -1 >> $i.hel
fi
j=`expr $j + 1`
done
2. Helidata
Program to calculate the Helix
length, and find out termination residue T from the o/p file of
the program PSW. This requires the o/p file from Helix
n=`cat $i | wc | awk
'{print $1}'`
echo $n
j=1
k=1
until [ $j -gt $n ]
do
head -$j $i | tail -1 > temp
a=`head -$j $i | tail -1 | cut -c35-37`
echo $a
if [ $a = "H" ]
then
b=$a
r=$k
until [ $b != "H" ]
do
head -$j $i | tail -1 >> heltemp
j=`expr $j + 1`
b=`head -$j $i | tail -1 | cut -c35-37`
head -$j $i | tail -1 > temp2
if [ $j -eq $n ]
then
exit
fi
done
noreshel=`cat heltemp | wc | awk '{print $1}'`
q=`cat temp2`
echo $r $noreshel $q >> $i.dat
rm heltemp
k=`expr $k + 1`
if [ $j -eq $n ]
then
exit
fi
fi
j=`expr $j + 1`
done
3. T41
Program to produce the i/p file
for DistCalc
for i in *.ent
do
j=1
n=`cat $i.dat | wc | awk '{print $1}'`
echo $n
until [ $j -gt $n ]
do
head -$j $i.dat | tail -1 > tp1
tres=`cat tp1 | awk '{print $3}'`
tr=`cat tp1 | awk '{print $4}'`
conf1=`cat tp1 | awk '{print $8}'`
conf2=`cat tp1 | awk '{print $9}'`
r1=`expr $tr + 1`
r4=`expr $tr - 4`
r4ca=`grep " $r4 " $i | grep " CA" | grep -v
" N" | grep -v " CB" | grep -v " C
" |cut -c12-56`
r1o=`grep " $r1 " $i | grep " O " | grep -v
" N" | grep -v " CB" | grep -v "
CA" |cut -c12-56`
r1c=`grep " $r1 " $i | grep " C " | grep -v
" N" | grep -v " CB" | grep -v "
CA" |cut -c12-56`
echo $j : T" ": $tres - Conf : $conf1 $conf2 >>
$i.t41
echo $j : T-4 : $r4ca >> $i.t41
echo $j : T+1 : $r1o >> $i.t41
echo $j : T+1 : $r1c >> $i.t41
j=`expr $j + 1`
done
done
4. DistCalc
Program to calculate the Ca(T-4)
to O(T+1) distance. This requires the o/p from T41
for i in *.t41
do
n=`cat $i | wc | awk '{print $1}'`
j=5
echo $n
k=1
until [ $j -gt $n ]
do
head -$j $i | tail -5 > tdst1
x1=`grep -h "T+1" tdst1 | grep "O" | awk
'{print $8}'`
y1=`grep -h "T+1" tdst1 | grep "O" | awk
'{print $9}'`
z1=`grep -h "T+1" tdst1 | grep "O" | awk
'{print $10}'`
x2=`grep -h "T-4" tdst1 | grep "CA" | awk
'{print $8}'`
y2=`grep -h "T-4" tdst1 | grep "CA" | awk
'{print $9}'`
z2=`grep -h "T-4" tdst1 | grep "CA" | awk
'{print $10}'`
echo $x1 $y1 $z1 $x2 $y2 $z2 > tsdt
cat tsdt
awk '{print sqrt(($4-$1)^2 + ($5-$2)^2 + ($6-$3)^2)}' tsdt >
tsdt1
dist=`cat tsdt1 | awk '{print $1}'`
echo Helix $k : $dist >> $i.t41a
echo Helix $k : $dist >> $i.t41a
echo Helix $k : $dist >> $i.t41a
echo Helix $k : $dist >> $i.t41a
echo " " >> $i.t41a
k=`expr $k + 1`
j=`expr $j + 5`
done
paste -d" " $i $i.t41a > $i.cho
rm $i.t41a
done
5. AAprop
Program to calculate the aminoacid propensities
for i in GLY ALA VAL LEU
ILE SER THR TYR CYS MET ASP ASN GLU GLN HIS PRO PHE TRP
do
a=`grep $i lhelix | wc | awk '{print $1}'`
echo no of $i in L-Ter : $a >> lterprop
done