123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- //$Id:
- /*******************************************************************************
- * Implementation of hook_install().
- */
- function tripal_analysis_interpro_install() {
- // create the module's data directory
- tripal_create_moddir('tripal_analysis_interpro');
- // We need to register to tripal_analysis module so it can provide a control
- // for our interpro result. Basically the registration is done by inserting
- // modulename into the drupal {tripal_analysis} table AND inserting required
- // information to the chado Analysis table. Also in tripal_analysis_interpro.module,
- // we need to define HOOK_get_settings() for the module to work properly.
-
- // Inert into drupal's {tripal_analysis}
- tripal_analysis_register_child('tripal_analysis_interpro');
-
- // add the CVterms needed for this module
- tripal_analysis_interpro_add_cvterms();
- }
- /*******************************************************************************
- * Implementation of hook_uninstall().
- */
- function tripal_analysis_interpro_uninstall() {
-
- // Delete all information associate with the module
- // Drupal complains when the user tries to uninstall tripal_analysis
- // and tripal_analysis_interpro at the same time. This is because Drupal drops
- // the {tripal_analysis} table before we can delete anything from it. Thus,
- // we perform a db_table_exists() check before the deletion
-
- //Delete the settings from {tripal_analysis} table
- tripal_analysis_unregister_child('tripal_analysis_interpro');
-
- // Delete module's variables from variables table.
- db_query("DELETE FROM {variable} WHERE name='%s'",
- 'tripal_analysis_interpro_setting');
- }
- /**
- *
- */
- function tripal_analysis_interpro_add_cvterms(){
- // Add cvterm 'analysis_interpro_output_iteration_hits' for inserting into featureprop table
- tripal_add_cvterms('analysis_interpro_xmloutput_hit', 'Hit in the interpro XML output. Each hit belongs to a chado feature. This cvterm represents a hit in the output');
- tripal_add_cvterms('analysis_interpro_output_hit', 'Hit in the interpro HTML output. Each hit belongs to a chado feature. This cvterm represents a hit in the output');
- tripal_add_cvterms('analysis_interpro_settings', 'Settings of an interpro analysis, including output file and run parameters separated by a bar |');
- tripal_add_cvterms('analysis_interpro_interproparameters','The parameters used when executing an InterProScan job');
- tripal_add_cvterms('analysis_interpro_interprofile','Used to hold the name of the XML file containing the InterProScan results');
- tripal_add_cvterms('analysis_interpro_parsego','Indicates whether or not the GO terms should be extracted when parsing the InterProScan XML file');
- tripal_add_cvterms('analysis_interpro_parseHTML','Indicates that the input file is in HTML format. This functionality is deprecated and may not work, but is provided for backwards compatability.');
- tripal_add_cvterms('analysis_interpro_query_re','The regular expression for finding the feature name in the query definition line of the InterPro results');
- tripal_add_cvterms('analysis_interpro_query_type','The feature type (e.g. mRNA, polypeptide) of the query input file. This type is used to identify the query feature when multiple features have the same name');
- tripal_add_cvterms('analysis_interpro_query_uniquename','Indicates if the matched name in the query definition line of the blast results is feature uniquename');
- tripal_add_cvterms('analysis_interpro_output_keywords', 'Selected keywords for interpro html output which are indexed for search.');
- }
- /**
- *
- */
- function tripal_analysis_interpro_update_6000(){
- // we have some new cvterms to add
- tripal_analysis_interpro_add_cvterms();
- $ret = array(
- '#finished' => 1,
- );
-
- return $ret;
- }
- /*******************************************************************************
- * Implementation of hook_requirements(). Make sure 'Tripal Core' and 'Tripal
- * Analysis' are enabled before installation
- */
- function tripal_analysis_interpro_requirements($phase) {
- $requirements = array();
- if ($phase == 'install') {
- if (!function_exists('tripal_create_moddir') || !function_exists('tripal_analysis_register_child')) {
- $requirements ['tripal_analysis_interpro'] = array(
- 'title' => "tripal_analysis_interpro",
- 'value' => "error. Some required modules are just being installed. Please try again.",
- 'severity' => REQUIREMENT_ERROR,
- );
- }
- }
- return $requirements;
- }
|