Thorfilters Exercise #1 -- with HINTS!

TASK:

Create a database named drugs for the eight molecules listed in the $DY_ROOT/data/drugs.smi file and include their assoc iated data found in the wdi023demo database.

PROCEDURE:

  • Verify that the thor server is running
    % thorping sun1 (replace sun1 with your server name) 
    thorping: Connection to sun1:thor succeeded
    

  • Verify that the server has access the wdi023demo database
    % thorls sun1
      thorls
      acd021demo
      asinex00demo
      bioscr00demo
      chemsynth97demo
      example_db
      maybridge00demo
      medchem02demo
      mix97demo
      nci00demo
      spresi95demo
      spresirxn98demo
      wdi023demo   <----YES!  
    

  • Extract the tdts from the wdi023demo database for the molecules in the $DY_ROOT/data/drugs.smi file by using thorlookup.
    % thorlookup wdi023demo < drugs.smi > drugs.tdt
    Enter server access password for sun1:thor:heather >> 
    Enter password for database wdi023demo@sun1:thor:* >> 
        NOTE: [DEMO] World Drug Index 2002.3 [DEMO]
        NOTE: 
        NOTE: COPYRIGHT 2002 DERWENT INFORMATION LTD.
    
    View the file and make sure it looks correct.
    

    First Few lines: % more drugs.tdt $SMI<O=C1CC2OCC=C3CN4CCC56C4CC3C2C6N1c7ccccc75&rt; FP<a1EjzC3O3YxLXQStUByAMEM6OWXDEKCkpGjxPdT+meHIVS3IR32mQLn3q1E9W1eLh+qOq7xOmfgHz cMUHvcdGEmWm5x3CwQXC.4E02VX8CX7Co2GdOAVV1EUTCIQRvg710s6AUc3W+.pRcEd++.+Ap096kja0 bR2NdJb796sFl2.2;2048;503;1024;449;1;&rt; CL<132;71;;0.0802&rt; TS<200211061952.10&rt; $GRF<OC1CC2OCCC3CN4CCC56C7CCCCC7N1C6C2C3CC45&rt; $DXRN<STRYCHNIN&rt; ISM<O=C1CC2OCC=C3CN4CC[C@]56[C@@H]4C[C@@H]3[C@@H]2C6N1c7ccccc75&rt; DPN<STRYCHNINE&rt; CAS<57-24-9&rt;

  • Use thorlist on the wdi023datatypes database to create a drugs_datatypes.tdt file.
    % thorlist wdi023demo_datatypes drugs_datatypes.tdt
    Enter server access password for sun1:thor:heather >> 
    Enter password for database wdi023demo_datatypes@sun1:thor:* >> 
    ....
    Done: 47 TDTs written, 11464 bytes total
    

  • Create an empty database named drugs_datatypes
    
    First, use tdtcount on file drugs_datatypes.tdt to determine the values for sizepri and sizexref:
    
    % tdtcount drugs_datatypes.tdt 
    11014 47 356 0 47 drugs_datatypes.tdt
          ^^       ^^
          ||       ||
       sizexref  sizepri
    
    So we can set the values of sizepri and sizexref both at 47.
    
    % thormake '$DY_THORDB/drugs_datatypes' 47 47 
    Enter server access password for sun1:thor:heather >> 
    Enter   READ password for database: 
    Confirm READ password for database: 
    Enter   WRITE password for database: 
    Confirm WRITE password for database: 
    Enter   EXECUTIVE password for database: 
    Confirm EXECUTIVE password for database: 
    Created database.
    thormake: Done.
    

  • Create an empty database named drugs
    
    First, use tdtcount on file drugs.tdt to
     determine the values for sizepri and sizexref:
    
    % tdtcount drugs.tdt
    40509 254 557 8 8 drugs.tdt
           ^        ^
           |        |
       sizexref  sizepri
    
    So we can set the values of sizepri and
    sizexref at 8 and 254, respectively.
          (Note: These values would be higher if we plan on
            adding tdts to this database.)
    
    % thormake -DATATYPES_DATABASE drugs_datatypes '$DY_THORDB/drugs' 8 254
    Enter server access password for sun1:thor:heather >>
    Enter   READ password for database:
    Confirm READ password for database:
    Enter   WRITE password for database:
    Confirm WRITE password for database:
    Enter   EXECUTIVE password for database:
    Confirm EXECUTIVE password for database:
    Created database.
    thormake: Done.
    

  • Load the drugs_datatypes.tdt file into the drugs_datatypes database
    % thorload drugs_datatypes drugs_datatypes.tdt
    Enter server access password for sun1:thor:heather >> 
    Enter password for database drugs_datatypes@sun1:thor:* >> 
    ....
    Done: 47 TDTs, 0 errors
    

  • If you have not done so already, set -DATATYPES_DATABASE for the database drugs.
    
    In the example shown in the Make the drugs database, we already
    specified the -DATATYPES_DATABASE to be  drugs_datatypes.
    However, you will be missing the datatypes specification if you failed
    to specify it using the command-line option by only typing:
    
    % thormake '$DY_THORDB/drugs' 10 300
    
    
    To check to see if the datatypes db is set correctly:
    
    % thordbinfo drugs
    Enter server access password for sun1:thor:heather >>
    Enter password for database drugs@sun1:thor:* >>
         name: /usr/local/daylight/thordb/drugs.THOR
     modified: Thu Jul 24 14:35:10 2003
    datatypes db: $DY_THORDB/drugs_datatypes
    indirect db:
    Number TDTs: 0
    Number Xrefs: 0
    TDT bytes: 0
    Xref bytes: 0
    TDT hash table: 11
    Xref hash table: 307
    Autocrunch limit: 50%
    "HOLD" database: FALSE
    Read-only: FALSE
    Record locking: DISABLED
    
    
    As shown above, we want 
    datatypes db:  to be set to  $DY_THORDB/drugs_datatypes
    
    If DATATYPES_DATABASE is set correctly, go to the next step:
    Load the drugs.tdt file into the drugs database
    
    If there nothing listed after datatypes db:,
    the correct database needs to be set using thorchange.
    
    You can assign the -DATATYPES_DATABASE using thorchange: 
    
    % thorchange '$DY_THORDB/drugs' -DATATYPES_DATABASE '$DY_THORDB/drugs_datatypes'
    
    Enter server access password for sun1:thor:heather >>
    Enter EXECUTIVE password for database:
    thorchange: Database opened.
    
    Changing passwords: [Return] means no change
                        "" means remove existing password
    
    Enter   READ password for database:
    Confirm READ password for database:
    Enter   WRITE password for database:
    Confirm WRITE password for database:
    Enter   EXECUTIVE password for database:
    Confirm EXECUTIVE password for database:
    Datatypes database set.
    thorchange: Done.
    
    

  • Load the drugs.tdt file into the drugs database
    % thorload drugs drugs.tdt
    Enter server access password for sun1:thor:heather >> 
    Enter password for database sun1@cooper:thor:* >> 
    
    Done: 8 TDTs, 0 errors
    

  • (Optional) For verification view drugs database using xvmerlin
    % merlinload drugs
    % xvmerlin &
    

    Go To ThorFilters Summary and Examples
    Go Back to Exercise #1
    Go To ThorFilters Exercise #2