Add TLDR module: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Here is quick guide to add your script into [[Tools18]] interface
Here is quick guide to add your script into [[TLDR]] interface
=== Scripts ===
=== Scripts ===


=== Add job type into psql table ===
=== Add job type into psql table ===
*Access the database
*Access the database
  $ psql -h mem blaster blasteruser
  $ psql -h mem2 -d blaster -U blasteruser


*Look for the next available index on job_types table
*Look for the next available index on job_types table
  blaster=> select * from job_types order by job_type_id;
  blaster=> select * from job_types order by job_type_id;
  You will see table like this
  You will see table like this
  job_type_id |        last_updated        |   short_name    
job_type_id |        last_updated        |     short_name     | hidden | approval_required | job_type_status_fk | description
  -------------+----------------------------+-------------------
  ------------+----------------------------+----------------------+--------+-------------------+--------------------+------------------------------------------------------------------------------------------------
            1 | 2018-10-05 00:00:00        | analog
          34 | 2024-03-07 09:48:22.442957 | build3d_covalent    | f      | f                |                 2 | Build db2 for covalent library using DOCK3.7 pipeline.
            2 | 2018-10-05 00:00:00        | blaster
          33 | 2023-02-08 10:17:11.904655 | dockopt2            | t      | f                |                 3 | Prepare receptor for docking and perform basic controls from SMILES inputs. This is retrodocking without optimization. Results can be used for Large Scale Docking.
            3 | 2018-10-05 00:00:00        | blasterpdb
            4 | 2018-10-05 00:00:00        | build2d
            5 | 2018-10-05 00:00:00        | build3d
            6 | 2018-10-05 00:00:00        | cluster
            7 | 2018-10-05 00:00:00        | covalent
            8 | 2018-10-05 00:00:00        | dude
            9 | 2018-10-05 00:00:00        | libanalysis
          10 | 2018-10-05 00:00:00        | reaction
          11 | 2018-10-05 00:00:00        | sea
          12 | 2018-10-05 00:00:00        | threec
          13 | 2018-10-05 00:00:00        | transform
          14 | 2018-10-05 00:00:00        | zincbatch
          15 | 2018-12-01 18:47:34        | cluster_molecules


* Insert new job type (Please be extra careful when doing this step)
* Insert new job type (Please be extra careful when doing this step)
  '''This is important to start command with 'begin;' so that if any syntax mistakes could be undo.'''
  '''This is important to start command with 'begin;' so that if any syntax mistakes could be undo.'''
  blaster=> begin; insert into job_types values(<next_available_id>, now(), '<your_job_name>');
  blaster=> begin; insert into job_types values(<next_available_id>, now(), '<job_shortname>', true, false, 1, <description>);
  Example:  
  Example:  
  blaster=> begin; insert into job_types values(16, now(), 'shape');
  blaster=> begin; insert into job_types values(16, now(), 'shape', true, false, 1, 'look up molecule based on molecular shape using FastROCS');
//To save data
blaster=> commit;
//Or if made mistake, to reverse cmd
blaster=> rollback;


=== Creating Template ===
=== Setting up templates ===
This is recommend that you go though all the currently existing modules on [http://tools18.docking.org/start Tools18] and reuse instead of starting one from scratch.
* Create template directory
sudo -i
su - www
cd /nfs/ex7/blaster/templates/
mkdir <job_name> # job_name must match the shortname in job_types table
chmod 777 job_name #for now...
* Get parameters.json
This is recommend that you go though all the currently existing modules on [https://tldr.docking.org TLDR] and reuse instead of starting one from scratch.
cd job_name
cp <whatever parameters.json you pick>
vim parameters.json
Change the variables. Check on the website if the module shows up.
* Move your shell scripts in directory


=== Test run! ===


=== Test run! ===
[[Category: Developer]]
[[Category: TLDR]]

Latest revision as of 18:12, 14 January 2025

Here is quick guide to add your script into TLDR interface

Scripts

Add job type into psql table

  • Access the database
$ psql -h mem2 -d blaster -U blasteruser
  • Look for the next available index on job_types table
blaster=> select * from job_types order by job_type_id;
You will see table like this
job_type_id |        last_updated        |      short_name      | hidden | approval_required | job_type_status_fk | description
------------+----------------------------+----------------------+--------+-------------------+--------------------+------------------------------------------------------------------------------------------------
         34 | 2024-03-07 09:48:22.442957 | build3d_covalent     | f      | f                 |                  2 | Build db2 for covalent library using DOCK3.7 pipeline.
         33 | 2023-02-08 10:17:11.904655 | dockopt2             | t      | f                 |                  3 | Prepare receptor for docking and perform basic controls from SMILES inputs. This is retrodocking without optimization. Results can be used for Large Scale Docking.
  • Insert new job type (Please be extra careful when doing this step)
This is important to start command with 'begin;' so that if any syntax mistakes could be undo.
blaster=> begin; insert into job_types values(<next_available_id>, now(), '<job_shortname>', true, false, 1, <description>);
Example: 
blaster=> begin; insert into job_types values(16, now(), 'shape', true, false, 1, 'look up molecule based on molecular shape using FastROCS');
//To save data
blaster=> commit;
//Or if made mistake, to reverse cmd
blaster=> rollback;

Setting up templates

  • Create template directory
sudo -i
su - www 
cd /nfs/ex7/blaster/templates/
mkdir <job_name> # job_name must match the shortname in job_types table
chmod 777 job_name #for now... 
  • Get parameters.json

This is recommend that you go though all the currently existing modules on TLDR and reuse instead of starting one from scratch.

cd job_name
cp <whatever parameters.json you pick>
vim parameters.json
Change the variables. Check on the website if the module shows up.
  • Move your shell scripts in directory

Test run!