tripal_bulk_loader.info_hooks.inc 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <?php
  2. /**
  3. * Implements hook_tripal_bulk_loader_supported_modules()
  4. * This is used to supply the base tables or modules supported by the bulk loader.
  5. * If a base table is included in this list there must also be a corresponding
  6. * implementation of hook_tripal_bulk_loader_<base table>_related_tables()
  7. *
  8. * @return
  9. * An array of <chado table> => <Human-readable Name> describing the modules supported
  10. */
  11. function tripal_bulk_loader_tripal_bulk_loader_supported_modules() {
  12. return array(
  13. 'feature' => 'Feature',
  14. 'organism' => 'Organism',
  15. 'library' => 'Library',
  16. 'analysis' => 'Analysis',
  17. 'stock' => 'Stocks',
  18. 'genotype' => 'Genotypes',
  19. );
  20. }
  21. /**
  22. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  23. * This is used to supply the bulk loader with a list of tables and their
  24. * relationship to the base table.
  25. *
  26. * @return
  27. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  28. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  29. * of relationship and the value is an array of tables with that relationship to the base table.
  30. * Each table in the array of tables with that relationship should be of the form
  31. * <chado table> => <Human-readable Name>.
  32. */
  33. function tripal_bulk_loader_tripal_bulk_loader_feature_related_tables () {
  34. return array(
  35. 'Base Table' => array(
  36. 'feature' => 'Feature'
  37. ),
  38. 'Foreign Key Relations' => array(
  39. 'organism' => 'Organism',
  40. 'cvterm' => 'Type: Cv Term',
  41. 'dbxref' => 'Database Reference',
  42. ),
  43. 'Direct Relations' => array(
  44. 'element' => 'Element',
  45. 'featureloc' => 'Feature Locations',
  46. 'featurepos' => 'Feature Positions on Map',
  47. 'featureprop' => 'Feature Properties',
  48. 'featurerange' => 'Feature Range',
  49. 'feature_relationship' => 'Feature Relationships',
  50. 'polynode' => 'Polynode'
  51. ),
  52. 'Indirect Relations' => array(
  53. 'analysisfeature' => 'Analysis',
  54. 'feature_cvterm' => 'Additional Cv Terms',
  55. 'feature_dbxref' => 'Additional Database References',
  56. 'feature_expression' => 'Feature Expressions',
  57. 'feature_genotype' => 'Genotypes',
  58. 'library_feature' => 'Libraries',
  59. 'feature_phenotype' => 'Phenotypes',
  60. 'feature_pub' => 'Publications',
  61. 'feature_synonym' => 'Synonyms',
  62. ),
  63. );
  64. }
  65. /**
  66. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  67. * This is used to supply the bulk loader with a list of tables and their
  68. * relationship to the base table.
  69. *
  70. * @return
  71. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  72. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  73. * of relationship and the value is an array of tables with that relationship to the base table.
  74. * Each table in the array of tables with that relationship should be of the form
  75. * <chado table> => <Human-readable Name>.
  76. */
  77. function tripal_bulk_loader_tripal_bulk_loader_organism_related_tables () {
  78. return array(
  79. 'Base Table' => array(
  80. 'feature' => 'Organism'
  81. ),
  82. 'Direct Relations' => array(
  83. 'biomaterial' => 'Biological Material',
  84. 'feature' => 'Features',
  85. 'library' => 'Libraries',
  86. 'organismprop' => 'Organism Properties',
  87. 'stock' => 'Stocks'
  88. ),
  89. 'Indirect Relations' => array(
  90. 'organism_dbxref' => 'Additional Database References',
  91. 'polynode_organism' => 'Polynodes',
  92. ),
  93. );
  94. }
  95. /**
  96. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  97. * This is used to supply the bulk loader with a list of tables and their
  98. * relationship to the base table.
  99. *
  100. * @return
  101. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  102. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  103. * of relationship and the value is an array of tables with that relationship to the base table.
  104. * Each table in the array of tables with that relationship should be of the form
  105. * <chado table> => <Human-readable Name>.
  106. */
  107. function tripal_bulk_loader_tripal_bulk_loader_library_related_tables () {
  108. return array(
  109. 'Base Table' => array(
  110. 'library' => 'Library'
  111. ),
  112. 'Foreign Key Relations' => array(
  113. 'organism' => 'Organism',
  114. 'cvterm' => 'Type: Cv Term',
  115. ),
  116. 'Direct Relations' => array(
  117. 'libraryprop' => 'Library Properties',
  118. ),
  119. 'Indirect Relations' => array(
  120. 'library_cvterm' => 'Additional Cv Terms',
  121. 'library_feature' => 'Features',
  122. 'library_pub' => 'Publications',
  123. 'library_synonym' => 'Synonyms',
  124. ),
  125. );
  126. }
  127. /**
  128. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  129. * This is used to supply the bulk loader with a list of tables and their
  130. * relationship to the base table.
  131. *
  132. * @return
  133. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  134. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  135. * of relationship and the value is an array of tables with that relationship to the base table.
  136. * Each table in the array of tables with that relationship should be of the form
  137. * <chado table> => <Human-readable Name>.
  138. */
  139. function tripal_bulk_loader_tripal_bulk_loader_analysis_related_tables () {
  140. return array(
  141. 'Base Table' => array(
  142. 'analysis' => 'Analysis'
  143. ),
  144. 'Direct Relations' => array(
  145. 'analysisprop' => 'Analysis Properties',
  146. 'phylotree' => 'Phylogeny Tree',
  147. 'quantification' => 'Quantification'
  148. ),
  149. 'Indirect Relations' => array(
  150. 'analysis_feature' => 'Features',
  151. ),
  152. );
  153. }
  154. /**
  155. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  156. * This is used to supply the bulk loader with a list of tables and their
  157. * relationship to the base table.
  158. *
  159. * @return
  160. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  161. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  162. * of relationship and the value is an array of tables with that relationship to the base table.
  163. * Each table in the array of tables with that relationship should be of the form
  164. * <chado table> => <Human-readable Name>.
  165. */
  166. function tripal_bulk_loader_tripal_bulk_loader_stock_related_tables () {
  167. return array(
  168. 'Base Table' => array(
  169. 'stock' => 'Stock'
  170. ),
  171. 'Foreign Key Relations' => array(
  172. 'organism' => 'Organism',
  173. 'cvterm' => 'Type: Cv Term',
  174. 'dbxref' => 'Database Reference',
  175. ),
  176. 'Direct Relations' => array(
  177. 'stockprop' => 'Stock Properties',
  178. 'stock_relationship' => 'Stock Relationships',
  179. ),
  180. 'Indirect Relations' => array(
  181. 'stock_cvterm' => 'Additional Cv Terms',
  182. 'stock_dbxref' => 'Additional Database References',
  183. 'stock_genotype' => 'Genotypes',
  184. 'stock_pub' => 'Publications',
  185. 'stockcollection_stock' => 'Stock Collections'
  186. ),
  187. );
  188. }
  189. /**
  190. * Implements hook_tripal_bulk_loader_<base table>_related_tables()
  191. * This is used to supply the bulk loader with a list of tables and their
  192. * relationship to the base table.
  193. *
  194. * @return
  195. * An array of relationships (any combination of 'Base Table', 'Foreign Key Relations',
  196. * 'Direct Relations', 'Indirect Relations') where each relationship is keyed by the type
  197. * of relationship and the value is an array of tables with that relationship to the base table.
  198. * Each table in the array of tables with that relationship should be of the form
  199. * <chado table> => <Human-readable Name>.
  200. */
  201. function tripal_bulk_loader_tripal_bulk_loader_genotype_related_tables () {
  202. return array(
  203. 'Base Table' => array(
  204. 'genotype' => 'Genotype'
  205. ),
  206. 'Indirect Relations' => array(
  207. 'feature_genotype' => 'Features',
  208. 'nd_experiment_genotype' => 'ND Experiments',
  209. 'phendesc' => 'Phenotypic Statements',
  210. 'phenotype_comparison' => 'Phenotype Comparisons',
  211. 'phenstatement' => 'Phenotypic Statements',
  212. 'stock_genotype' => 'Stocks',
  213. ),
  214. );
  215. }