Skip to content

Instantly share code, notes, and snippets.

@yukimya
Last active August 29, 2015 14:01
Show Gist options
  • Save yukimya/bf0b9d95e42e2fa08596 to your computer and use it in GitHub Desktop.
Save yukimya/bf0b9d95e42e2fa08596 to your computer and use it in GitHub Desktop.
for dssp_secondary.py
#!/bin/sh
#sed -e 's/[^3 ^4 ^5]/0/g' -e 's/[3 4 5]/1/g' $1 $1.helicity # for helicity
#sed -e 's/[^4 ]/0/g' -e 's/[4]/1/g' $1 # > $1.ahelix # for alpha-helix
i=1
max=1
file_head="../data/out.condition."
file_ext=".out"
new_ext=".ahelix"
while [ $i -le $max ]
do
filename=$file_head$i$file_ext
fileout=$file_head$i$new_ext
sed -e 's/[^4 ]/0/g' -e 's/[4]/1/g' $filename | awk '{$1=""; print}' > $fileout # for alpha-helix
i=$((i+1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment