GenDBWiki/DeveloperDocumentation/ToolIntegration

From BRF-Software
Revision as of 10:00, 25 January 2005 by imported>AlexanderGoesmann
Jump to navigation Jump to search

Integrating a new Tool into GenDB

Although the GenDB system already contains a number of standard bioinformatics tools that can be used for genome annotation, you may want to include your own tool (either for predicting regions or functions) or one of the many tools out there that are not yet incorporated in the current GenDB distribution. Since all standard tools like Glimmer or BLAST are implemented in their own special GENDB::DB::Tool subclasses (see the GenDB datamodel and API for details) incorporating a new tool would usually require modifications of the GenDB datamodel. In order to avoid such changes that usually have an impact on all active project databases (new classes with own attributes are stored in new SQL tables) we have introduced the class GENDB::DB::Tool::Generic that can be used to implement new tools without modifying the datamodel. Using this generic class, additional tools are not implemented in a GENDB::DB::DB_Server module but in a Perl module, usually located in the GENDB/Tools/ directory. As a template for creating such a new tool you can copy the GenericToolTemplate and add your own stuff. For implementing a new tool, you will basically need to implement a run method that executes the tool, parses the output, and creates new observations reflecting the tool result. Additionally, you can also use the auto-annotate method to perform some kind of automatic annotation (region prediction tools like Glimmer would then create regions and function predition tools like BLAST would usually write a new functional annotation in this method). For details please take a look at the tools already implemented within GenDB that can be found in GENDB::DB::DB_Server section.

Before you can now run and test your newly implemented generic tool, you will have to create a new object instance of this tool within your GenDB project database. This can be done using a simple script that creates a new GENDB::DB::Tool::Generic; you can copy the create_generic_tool_template.pl script as a template and modify it according to your needs. All options that are required for your new tool can be specified and stored persistently using a simple hash (attribute tool_options). After successfully creating a new instance of your specific generic tool you will have to create new jobs for each corresponding tool/region combination. This can be done quite easily using the submit_job.pl script.