[Debian Wiki] Update of "BOINC/Server/Projects/AutoDock" by NataliaNikitina

Debian Wiki debian-www at lists.debian.org
Fri Feb 28 12:10:55 UTC 2014


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "BOINC/Server/Projects/AutoDock" page has been changed by NataliaNikitina:
https://wiki.debian.org/BOINC/Server/Projects/AutoDock?action=diff&rev1=33&rev2=34

  
  === 5.1. Create a bash script to filter out docking results ===
  
- The "top" best compounds names may be extracted from the output files with use of convenient Linux utilites. We propose the following example: 
+ The "top" best compounds names may be extracted from the output files with use of convenient Linux utilites. We propose the following example.
+ 
+ The script ''extract_energy.sh'' to output the ligand names with their predicted binding energies:
  
  {{{#!highlight bash
+ #!/bin/sh
+ for n in $*
+ do
+         echo -n $(basename $n)
+         sed  -n '/-+-/{n;p}' $n | sed 's/  */ /g' | cut -f1,3 -d' '
+ done
+ }}}
+ 
+ The script ''get_top_energies.sh'' to sort the whole set of results and select the best ones:
+ 
+ {{{#!highlight bash
- #/bin/bash
+ #/bin/sh
- #Call: ./get_top_energies.sh [DIRECTORY WITH RESULT FILES (DEFAULT '.')] [NUMBER OF HITS (DEFAULT 10)]
+ #Call: ./get_top_energies.sh [DIRECTORY WITH RESULT FILES] [NUMBER OF HITS]
  TOP=10
  OUTPUTSDIR='.'
  if [ $# -ge 1 ] ; then
-   if [ -d $1 ] ;  then OUTPUTSDIR=$1
+   if [ -d $1 ] ;  then
+     OUTPUTSDIR=$1
      if [ $# -ge 2 ] ; then
        if ! [[ $2 =~ ^[0-9]+$ ]] ; then
          echo "Please, specify the number of hits properly."
@@ -145, +159 @@

      exit
    fi
  fi
+ find ${OUTPUTSDIR} -name "*_0" | xargs -r ./extract_energy.sh | sort -n -k 2,2 | head -$TOP
- for f in ${OUTPUTSDIR}/*_0                       #output file with top binding affinities, generated by BOINC assimilator
- do
-   echo -n `basename $f`; sed -n '/-+-/{n;p}' $f  #choose the best one for this compound (others may be useful later)
- done | sed 's/  */ /g' | cut -f1,3 -d' ' | sort -n -k 2,2 | head -$TOP
  }}}
  
  This bash script, executed in the directory with output files or with an appropriate parameter, should give the ligands names with binding affinity values. This data may be the first of interest for the project owner, and the script may easily be extended to extract more detailed information about docking results from the output files and the database. From the social point of view, it can be interesting to get the list of top ligands together with the names of users whose computers found them, and to display them at the project website. 



More information about the pkg-boinc-commits mailing list