tripal_feature.api.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Implements hook_chado_feature_schema()
  4. * Purpose: To add descriptions and foreign keys to default table description
  5. * Note: This array will be merged with the array from all other implementations
  6. *
  7. * @return
  8. * Array describing the feature table
  9. *
  10. * @ingroup tripal_feature
  11. */
  12. function tripal_feature_chado_feature_schema() {
  13. $description = array();
  14. $description['foreign keys']['organism'] = array(
  15. 'table' => 'organism',
  16. 'columns' => array(
  17. 'organism_id' => 'organism_id',
  18. ),
  19. );
  20. $description['foreign keys']['dbxref'] = array(
  21. 'table' => 'dbxref',
  22. 'columns' => array(
  23. 'dbxref_id' => 'dbxref_id',
  24. ),
  25. );
  26. $description['foreign keys']['cvterm'] = array(
  27. 'table' => 'cvterm',
  28. 'columns' => array(
  29. 'type_id' => 'cvterm_id',
  30. ),
  31. );
  32. $referring_tables = array('analysisfeature',
  33. 'element',
  34. 'feature_cvterm',
  35. 'feature_dbxref',
  36. 'feature_expression',
  37. 'feature_genotype',
  38. 'feature_phenotype',
  39. 'feature_pub',
  40. 'feature_relationship',
  41. 'feature_synonym',
  42. 'featureloc',
  43. 'featurepos',
  44. 'featureprop',
  45. 'featurerange',
  46. 'library_feature',
  47. 'phylonode',
  48. 'wwwuser_feature'
  49. );
  50. $description['referring_tables'] = $referring_tables;
  51. return $description;
  52. }