Mercurial > repos > marcel > caddsuite_mac10_6
diff CADDSuite-1.6/galaxyconfigs/countResidues.sh @ 10:eda78e0f5df6 draft default tip
Deleted selected files
author | marcel |
---|---|
date | Sun, 30 Nov 2014 03:46:08 -0500 |
parents | 488032d372e1 |
children |
line wrap: on
line diff
--- a/CADDSuite-1.6/galaxyconfigs/countResidues.sh Sat Dec 15 13:16:40 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -#!/bin/bash - -IFS=$'\n'; -residue_list="" -hetsys_list="" -hoh_list="" - -for line in $(cat $1); do - if [ "${line:0:4}" = "ATOM" ];then - residue_list+="${line:23:6}\n" - else - if [ "${line:0:6}" = "HETATM" ];then - s2=`echo $line | grep HOH` - if [ "$s2" != "" ];then - hoh_list+="${line:21:8}\n" - else - s3=`echo $line | grep WAT` - if [ "$s3" != "" ];then - hoh_list+="${line:21:8}\n" - else - hetsys_list+="${line:21:8}\n" - fi - fi - fi - fi -done - -IFS=$' '; -let num_res=`echo -e "\n"$residue_list | uniq | wc -l` -let num_hoh=`echo -e "\n"$hoh_list | uniq | wc -l` -let num_hetsys=`echo -e "\n"$hetsys_list | uniq | wc -l` - -# empty line at begin and end of lists -> substract 2 -let num_res-=2 -let num_hoh-=2 -let num_hetsys-=2 -if [ $num_res -lt 0 ]; then - let num_res=0 -fi -if [ $num_hoh -lt 0 ]; then - let num_hoh=0 -fi -if [ $num_hetsys -lt 0 ]; then - let num_hetsys=0 -fi - -echo -n "$num_res " -if [ $num_res -eq 1 ]; then - echo "residue" -else - echo "residues" -fi -echo -n "$num_hoh water " -if [ $num_hoh -eq 1 ]; then - echo "molecule" -else - echo "molecules" -fi -echo -n "$num_hetsys " -if [ $num_hetsys -eq 1 ]; then - echo "heterosystem" -else - echo "heterosystems" -fi