tripal_analysis.module 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <?php
  2. /**
  3. * @file
  4. * Contains all the main hook implementations for the tripal_analysis module
  5. *
  6. * @defgroup tripal_analysis Analysis Module
  7. * @ingroup tripal_modules
  8. * @{
  9. * Provides functions for managing chado analysis' including creating details pages for each one
  10. *
  11. * @}
  12. *
  13. *
  14. */
  15. require('api/tripal_analysis.api.inc');
  16. require('includes/tripal_analysis_privacy.inc');
  17. require('includes/tripal_analysis.admin.inc');
  18. require('includes/tripal_analysis.form.inc');
  19. /**
  20. * Add tripal javascript to page headers
  21. *
  22. * @ingroup tripal_analysis
  23. */
  24. function tripal_analysis_init() {
  25. drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_analysis.js');
  26. drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_analysis.css');
  27. }
  28. /**
  29. * Provide information to drupal about the node types that we're creating
  30. * in this module
  31. *
  32. * @ingroup tripal_analysis
  33. */
  34. function tripal_analysis_node_info() {
  35. $nodes = array();
  36. $nodes['chado_analysis'] = array(
  37. 'name' => t('Analysis'),
  38. 'base' => 'chado_analysis',
  39. 'description' => t('An analysis'),
  40. 'has_title' => FALSE,
  41. 'title_label' => t('Analysis'),
  42. 'locked' => TRUE
  43. );
  44. return $nodes;
  45. }
  46. /**
  47. * Implementation of hook_menu().
  48. * Entry points and paths of the module
  49. *
  50. * @ingroup tripal_analysis
  51. */
  52. function tripal_analysis_menu() {
  53. //Sync analysis
  54. $items['chado_sync_analyses'] = array(
  55. 'title' => 'Sync Data',
  56. 'page callback' => 'tripal_analysis_sync_analyses',
  57. 'access arguments' => array('administer tripal analyses'),
  58. 'type' => MENU_CALLBACK
  59. );
  60. // Tripal Analysis administrative settings
  61. $items['admin/tripal/chado/tripal_analysis'] = array(
  62. 'title' => 'Analyses',
  63. 'description' => 'A bioinformatics analysis producing features.',
  64. 'access arguments' => array('administer tripal analyses'),
  65. 'type' => MENU_NORMAL_ITEM,
  66. );
  67. $items['admin/tripal/chado/tripal_analysis/help'] = array(
  68. 'title' => 'Help',
  69. 'description' => "A description of the Tripal Analysis module including a short description of it's usage.",
  70. 'page callback' => 'theme',
  71. 'page arguments' => array('tripal_analysis_admin'),
  72. 'access arguments' => array('administer tripal analyses'),
  73. 'type' => MENU_NORMAL_ITEM,
  74. 'file' => 'includes/tripal_analysis.admin.inc',
  75. 'weight' => 10
  76. );
  77. $items['admin/tripal/chado/tripal_analysis/configuration'] = array(
  78. 'title' => 'Configuration',
  79. 'description' => 'Settings for the displays of analysis results.',
  80. 'page callback' => 'drupal_get_form',
  81. 'page arguments' => array('tripal_analysis_admin'),
  82. 'access arguments' => array('administer tripal analyses'),
  83. 'type' => MENU_NORMAL_ITEM,
  84. 'file' => 'includes/tripal_analysis.admin.inc',
  85. );
  86. $items['tripal_analysis/properties/minus/%/%'] = array(
  87. 'page callback' => 'tripal_analysis_property_delete',
  88. 'page arguments' => array(3, 4),
  89. 'access arguments' => array('edit chado_analysis content'),
  90. 'type ' => MENU_CALLBACK,
  91. );
  92. return $items;
  93. }
  94. /**
  95. * Implements hook_help()
  96. * Purpose: Adds a help page to the module list
  97. */
  98. function tripal_analysis_help ($path, $arg) {
  99. if ($path == 'admin/help#tripal_analysis') {
  100. return theme('tripal_analysis_admin', array());
  101. }
  102. }
  103. /**
  104. * When a new chado_analysis node is created we also need to add information
  105. * to our chado_analysis table. This function is called on insert of a new
  106. * node of type 'chado_analysis' and inserts the necessary information.
  107. *
  108. * @ingroup tripal_analysis
  109. */
  110. function chado_analysis_insert($node) {
  111. global $user;
  112. // Create a timestamp so we can insert it into the chado database
  113. $time = $node->timeexecuted;
  114. $month = $time['month'];
  115. $day = $time['day'];
  116. $year = $time['year'];
  117. $timestamp = $month . '/' . $day . '/' . $year;
  118. // If this analysis already exists then don't recreate it in chado
  119. $analysis_id = $node->analysis_id;
  120. if ($analysis_id) {
  121. $values = array('analysis_id' => $node->analysis_id);
  122. $result = tripal_core_chado_select('analysis', array('analysis_id'), $values);
  123. if ($result and count($result) > 0) {
  124. $analysis = $result[0];
  125. }
  126. }
  127. // If the analysis doesn't exist then let's create it in chado.
  128. if (!$analysis) {
  129. // insert and then get the newly inserted analysis record
  130. $values = array(
  131. 'name' => $node->analysisname,
  132. 'description' => $node->description,
  133. 'program' => $node->program,
  134. 'programversion' => $node->programversion,
  135. 'algorithm' => $node->algorithm,
  136. 'sourcename' => $node->sourcename,
  137. 'sourceversion' => $node->sourceversion,
  138. 'sourceuri' => $node->sourceuri,
  139. 'timeexecuted' => $timestamp
  140. );
  141. if (tripal_core_chado_insert('analysis', $values)) {
  142. $analysis = tripal_core_chado_select('analysis', array('*'), $values);
  143. $analysis_id = $analysis[0]->analysis_id;
  144. }
  145. }
  146. // Make sure the entry for this analysis doesn't already exist in the
  147. // chado_analysis table if it doesn't exist then we want to add it.
  148. $node_check_sql = "SELECT * FROM {chado_analysis} " .
  149. "WHERE analysis_id = :analysis_id";
  150. $node_check = db_query($node_check_sql, array(':analysis_id' => $analysis_id))->fetchObject();
  151. if (!$node_check) {
  152. // next add the item to the drupal table
  153. $sql = "INSERT INTO {chado_analysis} (nid, vid, analysis_id) " .
  154. "VALUES (:nid, :vid, :analysis_id)";
  155. db_query($sql, array(':nid' => $node->nid, ':vid' => $node->vid, ':analysis_id' => $analysis_id));
  156. // Create a title for the analysis node using the unique keys so when the
  157. // node is saved, it will have a title
  158. $record = new stdClass();
  159. // If the analysis has a name, use it as the node title. If not, construct
  160. // the title using program, programversion, and sourcename
  161. if ($node->analysisname) {
  162. $record->title = $node->analysisname;
  163. }
  164. else {
  165. //Construct node title as "program (version)
  166. $record->title = "$node->program ($node->programversion)";
  167. }
  168. $record->nid = $node->nid;
  169. drupal_write_record('node', $record, 'nid');
  170. drupal_write_record('node_revisions', $record, 'nid');
  171. }
  172. // add the analysis to the node object for
  173. // use by other analysis modules that may be using this function
  174. $node->analysis = $analysis;
  175. $node->analysis_id = $analysis_id; // we need to set this for children
  176. // now add the properties
  177. $properties = array(); // stores all of the properties we need to add
  178. // get the list of properties for easy lookup (without doing lots of database queries
  179. $properties_list = array();
  180. $sql = "
  181. SELECT DISTINCT CVT.cvterm_id, CVT.name, CVT.definition
  182. FROM {cvterm} CVT
  183. INNER JOIN {cv} ON CVT.cv_id = CV.cv_id
  184. WHERE
  185. CV.name = 'analysis_property' AND
  186. NOT CVT.is_obsolete = 1
  187. ORDER BY CVT.name ASC
  188. ";
  189. $prop_types = chado_query($sql);
  190. while ($prop = $prop_types->fetchObject()) {
  191. $properties_list[$prop->cvterm_id] = $prop->name;
  192. }
  193. // get the properties that should be added. Properties are in one of two forms:
  194. // 1) prop_value-[type id]-[index]
  195. // 2) new_value-[type id]-[index]
  196. // 3) new_id, new_value
  197. foreach ($node as $name => $value) {
  198. if (preg_match('/^new_value-(\d+)-(\d+)/', $name, $matches)) {
  199. $type_id = $matches[1];
  200. $index = $matches[2];
  201. $name = $properties_list[$type_id];
  202. $properties[$name][$index] = trim($value);
  203. }
  204. }
  205. if ($node->new_id and $node->new_value) {
  206. $type_id = $node->new_id;
  207. $name = $properties_list[$type_id];
  208. $index = count($properties[$name]);
  209. $properties[$name][$index] = trim($node->new_value);
  210. }
  211. // now add in the properties
  212. foreach ($properties as $property => $elements) {
  213. foreach ($elements as $rank => $value) {
  214. $status = tripal_analysis_insert_property($analysis_id, $property, $value, FALSE, 'analysis_property');
  215. if (!$status) {
  216. drupal_set_message("Error cannot add property: $property", "error");
  217. watchdog('t_analysis', "Error cannot add property: %prop",
  218. array('%property' => $property), WATCHDOG_ERROR);
  219. }
  220. }
  221. }
  222. }
  223. /**
  224. * Removes analysis from the chado database
  225. *
  226. * @param $node
  227. * The node object specifying which chado record to delete
  228. *
  229. * @ingroup tripal_analysis
  230. */
  231. function chado_analysis_delete($node) {
  232. $analysis_id = chado_get_id_for_node('analysis', $node->nid);
  233. // if we don't have an analysis id for this node then this isn't a node of
  234. // type chado_analysis or the entry in the chado_analysis table was lost.
  235. if (!$analysis_id) {
  236. return;
  237. }
  238. // Remove data from the {chado_analysis}, {node}, and {node_revisions} tables
  239. $sql_del = "DELETE FROM {chado_analysis} " .
  240. "WHERE nid = :nid " .
  241. "AND vid = :vid";
  242. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  243. $sql_del = "DELETE FROM {node} " .
  244. "WHERE nid = :nid " .
  245. "AND vid = :vid";
  246. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  247. $sql_del = "DELETE FROM {node_revision} " .
  248. "WHERE nid = :nid " .
  249. "AND vid = :vid";
  250. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  251. //Remove from analysis and analysisprop tables of chado database as well
  252. chado_query("DELETE FROM {analysis} WHERE analysis_id = :analysis_id", array(':analysis_id' => $analysis_id));
  253. }
  254. /**
  255. * Update analyses
  256. *
  257. * @param $node
  258. * The updated node object
  259. *
  260. * @ingroup tripal_analysis
  261. */
  262. function chado_analysis_update($node) {
  263. global $user;
  264. if ($node->revision) {
  265. // TODO -- decide what to do about revisions
  266. }
  267. // Create a timestamp so we can insert it into the chado database
  268. $time = $node->timeexecuted;
  269. $month = $time['month'];
  270. $day = $time['day'];
  271. $year = $time['year'];
  272. $timestamp = $month . '/' . $day . '/' . $year;
  273. // get the analysis_id for this node:
  274. $sql = "
  275. SELECT analysis_id
  276. FROM {chado_analysis}
  277. WHERE nid = :nid
  278. ";
  279. $analysis = db_query($sql, array(':nid' => $node->nid))->fetchObject();
  280. $analysis_id = $analysis->analysis_id;
  281. $sql = "
  282. UPDATE {analysis}
  283. SET name = :name,
  284. description = :description,
  285. program = :program,
  286. programversion = :programversion,
  287. algorithm = :algorithm,
  288. sourcename = :sourcename,
  289. sourceversion = :sourceversion,
  290. sourceuri = :sourceuri,
  291. timeexecuted = :timeexecuted
  292. WHERE analysis_id = :analysis_id
  293. ";
  294. $args = array(
  295. ':name' => $node->analysisname,
  296. ':description' => $node->description,
  297. ':program' => $node->program,
  298. ':programversion' => $node->programversion,
  299. ':algorithm' => $node->algorithm,
  300. ':sourcename' => $node->sourcename,
  301. ':sourceversion' => $node->sourceversion,
  302. ':sourceuri' => $node->sourceuri,
  303. ':timeexecuted' => $timestamp,
  304. ':analysis_id' => $anslysis_id
  305. );
  306. chado_query($sql, $args);
  307. // Create a title for the analysis node using the unique keys so when the
  308. // node is saved, it will have a title
  309. $record = new stdClass();
  310. // If the analysis has a name, use it as the node title. If not, construct
  311. // the title using program, programversion, and sourcename
  312. if ($node->analysisname) {
  313. $record->title = $node->analysisname;
  314. }
  315. else {
  316. //Construct node title as "program (version)
  317. $record->title = "$node->program ($node->programversion)";
  318. }
  319. $record->nid = $node->nid;
  320. drupal_write_record('node', $record, 'nid');
  321. drupal_write_record('node_revisions', $record, 'nid');
  322. // now update the properties
  323. $properties = array(); // stores all of the properties we need to add
  324. // get the list of properties for easy lookup (without doing lots of database queries
  325. $properties_list = array();
  326. $sql = "
  327. SELECT DISTINCT CVT.cvterm_id, CVT.name, CVT.definition
  328. FROM {cvterm} CVT
  329. INNER JOIN {cv} ON CVT.cv_id = CV.cv_id
  330. WHERE
  331. CV.name = 'analysis_property' AND
  332. NOT CVT.is_obsolete = 1
  333. ORDER BY CVT.name ASC
  334. ";
  335. $prop_types = chado_query($sql);
  336. while ($prop = $prop_types->fetchObject()) {
  337. $properties_list[$prop->cvterm_id] = $prop->name;
  338. }
  339. // get the properties that should be added. Properties are in one of three forms:
  340. // 1) prop_value-[type id]-[index]
  341. // 2) new_value-[type id]-[index]
  342. // 3) new_id, new_value
  343. // dpm($node);
  344. foreach ($node as $key => $value) {
  345. if (preg_match('/^prop_value-(\d+)-(\d+)/', $key, $matches)) {
  346. $type_id = $matches[1];
  347. $index = $matches[2];
  348. $name = $properties_list[$type_id];
  349. $properties[$name][$index] = trim($value);
  350. }
  351. if (preg_match('/^new_value-(\d+)-(\d+)/', $key, $matches)) {
  352. $type_id = $matches[1];
  353. $index = $matches[2];
  354. $name = $properties_list[$type_id];
  355. $properties[$name][$index] = trim($value);
  356. }
  357. }
  358. if ($node->new_id and $node->new_value) {
  359. $type_id = $node->new_id;
  360. $name = $properties_list[$type_id];
  361. $index = count($properties[$name]);
  362. $properties[$name][$index] = trim($node->new_value);
  363. }
  364. // now add in the properties by first removing any the analysis
  365. // already has and adding the ones we have
  366. $sql = "
  367. DELETE FROM {analysisprop} WHERE analysis_id = :analysis_id AND type_id IN (
  368. SELECT CVT.cvterm_id
  369. FROM {cvterm} CVT
  370. INNER JOIN {cv} ON CVT.cv_id = CV.cv_id
  371. WHERE CV.name = 'analysis_property')
  372. ";
  373. $success = chado_query($sql, array(':analysis_id' => $analysis_id));
  374. if (!$success) {
  375. drupal_set_message("Cannot update analysis properties", "error");
  376. watchdog('t_analysis', "Cannot update analysis properties.", array(), WATCHDOG_ERROR);
  377. return;
  378. }
  379. foreach ($properties as $property => $elements) {
  380. foreach ($elements as $rank => $value) {
  381. $status = tripal_analysis_insert_property($analysis_id, $property, $value, FALSE, 'analysis_property');
  382. if (!$status) {
  383. drupal_set_message("Error cannot add property: '$property'", "error");
  384. watchdog('t_analysis', "Error cannot add property: '%prop'",
  385. array('%prop' => $property), WATCHDOG_ERROR);
  386. }
  387. }
  388. }
  389. }
  390. /**
  391. * When a node is requested by the user this function is called to allow us
  392. * to add auxiliary data to the node object.
  393. *
  394. * @ingroup tripal_analysis
  395. */
  396. function chado_analysis_load($node) {
  397. // get the feature details from chado
  398. $analysis_id = chado_get_id_for_node('analysis', $node->nid);
  399. $values = array('analysis_id' => $analysis_id);
  400. $analysis = tripal_core_generate_chado_var('analysis', $values);
  401. $additions = new stdClass();
  402. $additions->analysis = $analysis;
  403. return $additions;
  404. }
  405. /**
  406. * This function customizes the view of the chado_analysis node. It allows
  407. * us to generate the markup.
  408. *
  409. * @ingroup tripal_analysis
  410. */
  411. function chado_analysis_view($node, $teaser = FALSE, $page = FALSE) {
  412. // use drupal's default node view:
  413. if (!$teaser) {
  414. $node = node_prepare($node, $teaser);
  415. // When previewing a node submitting form, it shows 'Array' instead of
  416. // correct date format. We need to format the date here
  417. $time = $node->timeexecuted;
  418. if (is_array($time)) {
  419. $month = $time['month'];
  420. $day = $time['day'];
  421. $year = $time['year'];
  422. $timestamp = $year . '-' . $month . '-' . $day;
  423. $node->timeexecuted = $timestamp;
  424. }
  425. }
  426. return $node;
  427. }
  428. /**
  429. * Implement hook_access().
  430. *
  431. * This hook allows node modules to limit access to the node types they define.
  432. *
  433. * @param $node
  434. * The node on which the operation is to be performed, or, if it does not yet exist, the
  435. * type of node to be created
  436. *
  437. * @param $op
  438. * The operation to be performed
  439. *
  440. * @param $account
  441. * A user object representing the user for whom the operation is to be performed
  442. *
  443. * @return
  444. * If the permission for the specified operation is not set then return FALSE. If the
  445. * permission is set then return NULL as this allows other modules to disable
  446. * access. The only exception is when the $op == 'create'. We will always
  447. * return TRUE if the permission is set.
  448. *
  449. * @ingroup tripal_analysis
  450. */
  451. function chado_analysis_node_access($node, $op, $account) {
  452. if ($op == 'create') {
  453. if (!user_access('create chado_analysis content', $account)) {
  454. return FALSE;
  455. }
  456. return TRUE;
  457. }
  458. if ($op == 'update') {
  459. if (!user_access('edit chado_analysis content', $account)) {
  460. return FALSE;
  461. }
  462. }
  463. if ($op == 'delete') {
  464. if (!user_access('delete chado_analysis content', $account)) {
  465. return FALSE;
  466. }
  467. }
  468. if ($op == 'view') {
  469. if (!user_access('access chado_analysis content', $account)) {
  470. return FALSE;
  471. }
  472. }
  473. return NULL;
  474. }
  475. /**
  476. * Set the permission types that the chado module uses. Essentially we
  477. * want permissionis that protect creation, editing and deleting of chado
  478. * data objects
  479. *
  480. * @ingroup tripal_analysis
  481. */
  482. function tripal_analysis_permission() {
  483. return array(
  484. 'access chado_analysis content' => array(
  485. 'title' => t('View Analyses'),
  486. 'description' => t('Allow users to view analysis pages.'),
  487. ),
  488. 'create chado_analysis content' => array(
  489. 'title' => t('Create Analyses'),
  490. 'description' => t('Allow users to create new analysis pages.'),
  491. ),
  492. 'delete chado_analysis content' => array(
  493. 'title' => t('Delete Analyses'),
  494. 'description' => t('Allow users to delete analysis pages.'),
  495. ),
  496. 'edit chado_analysis content' => array(
  497. 'title' => t('Edit Analyses'),
  498. 'description' => t('Allow users to edit analysis pages.'),
  499. ),
  500. 'adminster tripal analysis' => array(
  501. 'title' => t('Administer Analyses'),
  502. 'description' => t('Allow users to administer all analyses.'),
  503. ),
  504. );
  505. }
  506. /**
  507. * We need to let drupal know about our theme functions and their arguments.
  508. * We create theme functions to allow users of the module to customize the
  509. * look and feel of the output generated in this module
  510. *
  511. * @ingroup tripal_analysis
  512. */
  513. function tripal_analysis_theme() {
  514. $items = array(
  515. 'tripal_analysis_base' => array(
  516. 'arguments' => array('node' => NULL),
  517. 'template' => 'tripal_analysis_base',
  518. ),
  519. 'tripal_feature_analyses' => array(
  520. 'template' => 'tripal_feature_analyses',
  521. 'arguments' => array('node' => NULL),
  522. ),
  523. 'tripal_analysis_admin' => array(
  524. 'template' => 'tripal_analysis_admin',
  525. 'arguments' => array(NULL),
  526. 'path' => drupal_get_path('module', 'tripal_analysis') . '/theme',
  527. ),
  528. 'tripal_analysis_properties' => array(
  529. 'arguments' => array('node' => NULL)
  530. ),
  531. // Themed Forms
  532. 'chado_analysis_node_form' => array(
  533. 'arguments' => array('form'),
  534. ),
  535. );
  536. return $items;
  537. }
  538. /**
  539. *
  540. *
  541. * @ingroup tripal_analysis
  542. */
  543. function tripal_analysis_block_info() {
  544. $blocks['base']['info'] = t('Tripal Analysis Details');
  545. $blocks['base']['cache'] = BLOCK_NO_CACHE;
  546. $blocks['featureblast']['info'] = t('Tripal Feature Analyses');
  547. $blocks['featureblast']['cache'] = BLOCK_NO_CACHE;
  548. return $blocks;
  549. }
  550. /**
  551. *
  552. *
  553. * @ingroup tripal_analysis
  554. */
  555. function tripal_analysis_block_view($delta = '') {
  556. if (user_access('access chado_analysis content') and arg(0) == 'node' and is_numeric(arg(1))) {
  557. $nid = arg(1);
  558. $node = node_load($nid);
  559. $block = array();
  560. switch ($delta) {
  561. case 'base':
  562. $block['subject'] = t('Analysis Details');
  563. $block['content'] = theme('tripal_analysis_base', $node);
  564. break;
  565. case 'tripal_feature_analyses':
  566. $block['subject'] = t('Feature Analyses');
  567. $block['content'] = theme('tripal_feature_analyses', $node);
  568. break;
  569. default :
  570. }
  571. return $block;
  572. }
  573. }
  574. /**
  575. *
  576. * Implements hook_node_view()
  577. */
  578. function tripal_analysis_node_view($node, $view_mode, $langcode) {
  579. if ($node->type == 'chado_feature') {
  580. if ($view_mode == 'search_index') {
  581. // return results for searching
  582. }
  583. if ($view_mode == 'full') {
  584. // return normal results
  585. $node->content['tripal_feature_analyses'] = array(
  586. '#markup' => theme('tripal_feature_analyses', $node),
  587. );
  588. }
  589. }
  590. }
  591. /**
  592. * Implements hook_views_api()
  593. * Purpose: Essentially this hook tells drupal that there is views support for
  594. * for this module which then includes tripal_analysis.views.inc where all the
  595. * views integration code is
  596. *
  597. * @ingroup tripal_analysis
  598. */
  599. function tripal_analysis_views_api() {
  600. return array(
  601. 'api' => 2.0,
  602. );
  603. }
  604. /*
  605. *
  606. */
  607. function tripal_analysis_form_alter(&$form, &$form_state, $form_id) {
  608. if ($form_id == "chado_analysis_node_form") {
  609. }
  610. }