Skip to content

Instantly share code, notes, and snippets.

@filipsPL
Last active September 23, 2019 09:40
Show Gist options
  • Select an option

  • Save filipsPL/5aea99245ba903d694ae70aa0c107d61 to your computer and use it in GitHub Desktop.

Select an option

Save filipsPL/5aea99245ba903d694ae70aa0c107d61 to your computer and use it in GitHub Desktop.
For all *.logs files in the directory: extracts scores and compound names from dock6 docking logs and puts it to the simple csv file, with the name of the input file.
for f in *.logs;
do echo $f;
echo "compound,score" > `basename $f .logs`.csv;
cat $f | egrep "Molecule:|Grid_Score" | tr -s " " | sed -e ':a;N;$!ba;s/\n Grid_Score: / /g' -e 's/Molecule: //g' | \
tr " " "," >> `basename $f .logs`.csv;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment