tripal_feature.api.inc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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_schema_api
  11. */
  12. function tripal_feature_chado_feature_schema() {
  13. $description = array();
  14. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_feature_schema()
  15. $description['foreign keys']['organism'] = array(
  16. 'table' => 'organism',
  17. 'columns' => array(
  18. 'organism_id' => 'organism_id',
  19. ),
  20. );
  21. $description['foreign keys']['dbxref'] = array(
  22. 'table' => 'dbxref',
  23. 'columns' => array(
  24. 'dbxref_id' => 'dbxref_id',
  25. ),
  26. );
  27. $description['foreign keys']['cvterm'] = array(
  28. 'table' => 'cvterm',
  29. 'columns' => array(
  30. 'type_id' => 'cvterm_id',
  31. ),
  32. );
  33. $referring_tables = array('analysisfeature',
  34. 'element',
  35. 'feature_cvterm',
  36. 'feature_dbxref',
  37. 'feature_expression',
  38. 'feature_genotype',
  39. 'feature_phenotype',
  40. 'feature_pub',
  41. 'feature_relationship',
  42. 'feature_synonym',
  43. 'featureloc',
  44. 'featurepos',
  45. 'featureprop',
  46. 'featurerange',
  47. 'library_feature',
  48. 'phylonode',
  49. 'wwwuser_feature'
  50. );
  51. $description['referring_tables'] = $referring_tables;
  52. return $description;
  53. }
  54. /**
  55. * Implements hook_chado_featureprop_schema()
  56. * Purpose: To add descriptions and foreign keys to default table description
  57. * Note: This array will be merged with the array from all other implementations
  58. *
  59. * @return
  60. * Array describing the featureprop table
  61. *
  62. * @ingroup tripal_schema_api
  63. */
  64. function tripal_feature_chado_featureprop_schema() {
  65. $description = array();
  66. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_featureprop_schema()
  67. $description['foreign keys']['feature'] = array(
  68. 'table' => 'feature',
  69. 'columns' => array(
  70. 'feature_id' => 'feature_id',
  71. ),
  72. );
  73. $description['foreign keys']['cvterm'] = array(
  74. 'table' => 'cvterm',
  75. 'columns' => array(
  76. 'type_id' => 'cvterm_id',
  77. ),
  78. );
  79. $referring_tables = array('analysisfeature',
  80. 'featureprop_pub',
  81. );
  82. $description['referring_tables'] = $referring_tables;
  83. return $description;
  84. }
  85. /**
  86. * Implements hook_chado_featureloc_schema()
  87. * Purpose: To add descriptions and foreign keys to default table description
  88. * Note: This array will be merged with the array from all other implementations
  89. *
  90. * @return
  91. * Array describing the featureloc table
  92. *
  93. * @ingroup tripal_schema_api
  94. */
  95. function tripal_feature_chado_featureloc_schema() {
  96. $description = array();
  97. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_featureloc_schema()
  98. $description['foreign keys']['feature'] = array(
  99. 'table' => 'feature',
  100. 'columns' => array(
  101. 'feature_id' => 'feature_id',
  102. 'srcfeature_id' => 'feature_id'
  103. ),
  104. );
  105. $referring_tables = array('analysisfeature',
  106. 'featureloc_pub',
  107. );
  108. $description['referring_tables'] = $referring_tables;
  109. return $description;
  110. }
  111. /**
  112. * Implements hook_chado_feature_dbxref_schema()
  113. * Purpose: To add descriptions and foreign keys to default table description
  114. * Note: This array will be merged with the array from all other implementations
  115. *
  116. * @return
  117. * Array describing the feature_dbxref table
  118. *
  119. * @ingroup tripal_schema_api
  120. */
  121. function tripal_feature_chado_feature_dbxref_schema() {
  122. $description = array();
  123. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_feature_dbxref_schema()
  124. $description['foreign keys']['feature'] = array(
  125. 'table' => 'feature',
  126. 'columns' => array(
  127. 'feature_id' => 'feature_id',
  128. ),
  129. );
  130. $description['foreign keys']['dbxref'] = array(
  131. 'table' => 'dbxref',
  132. 'columns' => array(
  133. 'dbxref_id' => 'dbxref_id',
  134. ),
  135. );
  136. return $description;
  137. }
  138. /**
  139. * Implements hook_chado_feature_relationship_schema()
  140. * Purpose: To add descriptions and foreign keys to default table description
  141. * Note: This array will be merged with the array from all other implementations
  142. *
  143. * @return
  144. * Array describing the feature_dbxref table
  145. *
  146. * @ingroup tripal_schema_api
  147. */
  148. function tripal_feature_chado_feature_relationship_schema() {
  149. $description = array();
  150. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_feature_dbxref_schema()
  151. $description['foreign keys']['feature'] = array(
  152. 'table' => 'feature',
  153. 'columns' => array(
  154. 'object_id' => 'feature_id',
  155. 'subject_id' => 'feature_id',
  156. ),
  157. );
  158. $description['foreign keys']['cvterm'] = array(
  159. 'table' => 'cvterm',
  160. 'columns' => array(
  161. 'type_id' => 'cvterm_id',
  162. ),
  163. );
  164. return $description;
  165. }
  166. /**
  167. * Implements hook_chado_feature_relationship_schema()
  168. * Purpose: To add descriptions and foreign keys to default table description
  169. * Note: This array will be merged with the array from all other implementations
  170. *
  171. * @return
  172. * Array describing the feature_dbxref table
  173. *
  174. * @ingroup tripal_schema_api
  175. */
  176. function tripal_feature_chado_feature_cvterm_schema() {
  177. $description = array();
  178. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_feature_dbxref_schema()
  179. $description['foreign keys']['feature'] = array(
  180. 'table' => 'feature',
  181. 'columns' => array(
  182. 'feature_id' => 'feature_id',
  183. ),
  184. );
  185. $description['foreign keys']['cvterm'] = array(
  186. 'table' => 'cvterm',
  187. 'columns' => array(
  188. 'type_id' => 'cvterm_id',
  189. ),
  190. );
  191. $description['foreign keys']['pub'] = array(
  192. 'table' => 'pub',
  193. 'columns' => array(
  194. 'pub_id' => 'pub_id',
  195. ),
  196. );
  197. return $description;
  198. }
  199. /**
  200. *
  201. * @ingroup tripal_schema_api
  202. */
  203. function tripal_feature_chado_feature_synonym_schema() {
  204. $description = array();
  205. // Default table description in tripal_core.schema.api.inc: tripal_core_chado_feature_dbxref_schema()
  206. $description['foreign keys']['feature'] = array(
  207. 'table' => 'feature',
  208. 'columns' => array(
  209. 'feature_id' => 'feature_id',
  210. ),
  211. );
  212. $description['foreign keys']['synonym'] = array(
  213. 'table' => 'synonym',
  214. 'columns' => array(
  215. 'synonym_id' => 'synonym_id',
  216. ),
  217. );
  218. $description['foreign keys']['pub'] = array(
  219. 'table' => 'pub',
  220. 'columns' => array(
  221. 'pub_id' => 'pub_id',
  222. ),
  223. );
  224. return $description;
  225. }