tripal_analysis.module 20 KB

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