tripal_genetic.api.inc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Implements hook_chado_genotype_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 genotype table
  9. *
  10. * @ingroup tripal_schema_api
  11. */
  12. function tripal_genetic_chado_genotype_schema () {
  13. $description = array();
  14. $referring_tables = array('analysisfeature',
  15. 'feature_genotype',
  16. 'phendesc',
  17. 'phenotype_comparison',
  18. 'phenstatement',
  19. 'stock_genotype',
  20. );
  21. $description['referring_tables'] = $referring_tables;
  22. return $description;
  23. }
  24. /**
  25. * Implements hook_chado_genotype_schema()
  26. * Purpose: To add descriptions and foreign keys to default table description
  27. * Note: This array will be merged with the array from all other implementations
  28. *
  29. * @return
  30. * Array describing the genotype table
  31. *
  32. * @ingroup tripal_schema_api
  33. */
  34. function tripal_genetic_chado_feature_genotype_schema () {
  35. $description = array();
  36. $description['foreign keys']['feature'] = array(
  37. 'table' => 'feature',
  38. 'columns' => array(
  39. 'feature_id' => 'feature_id',
  40. 'chromosome_id' => 'feature_id',
  41. ),
  42. );
  43. $description['foreign keys']['genotype'] = array(
  44. 'table' => 'genotype',
  45. 'columns' => array(
  46. 'genotype_id' => 'genotype_id',
  47. ),
  48. );
  49. $description['foreign keys']['cvterm'] = array(
  50. 'table' => 'cvterm',
  51. 'columns' => array(
  52. 'type_id' => 'cvterm_id',
  53. ),
  54. );
  55. return $description;
  56. }