tripal_bulk_loader.module 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <?php
  2. include('tripal_bulk_loader.loader.inc');
  3. include('tripal_bulk_loader.constants.inc');
  4. include('tripal_bulk_loader.admin.inc');
  5. include('tripal_bulk_loader.admin.templates.inc');
  6. // API
  7. include('api/tripal_bulk_loader.api.templates.inc');
  8. /**
  9. * Implements hook_init
  10. * Used to add stylesheets and javascript files to the header
  11. */
  12. function tripal_bulk_loader_init() {
  13. // Add javascript and style sheet
  14. drupal_add_css(drupal_get_path('theme', 'tripal') . '/css/tripal_bulk_loader.css');
  15. drupal_add_js(drupal_get_path('theme', 'tripal') . '/js/tripal_bulk_loader.js');
  16. }
  17. /**
  18. * Implements hook_menu
  19. */
  20. function tripal_bulk_loader_menu() {
  21. $items = array();
  22. // Bulk Loading Job Node
  23. $items['node/%node/constants/%/edit'] = array(
  24. 'title' => 'Edit Constant Set',
  25. 'description' => 'Edit a group of constants associated with the current bulk loader',
  26. 'page callback' => 'drupal_get_form',
  27. 'page arguments' => array('tripal_bulk_loader_edit_constant_set_form', 1, 3),
  28. 'access arguments' => array('administer site configuration'),
  29. 'type' => MENU_CALLBACK,
  30. );
  31. $items['node/%node/constants/%/delete'] = array(
  32. 'title' => 'Delete Constant Set',
  33. 'description' => 'Delete a group of constants associated with the current bulk loader',
  34. 'page callback' => 'drupal_get_form',
  35. 'page arguments' => array('tripal_bulk_loader_delete_constant_set_form', 1, 3),
  36. 'access arguments' => array('administer site configuration'),
  37. 'type' => MENU_CALLBACK,
  38. );
  39. // Admin pages -----------------
  40. $items['admin/tripal/tripal_bulk_loader_template'] = array(
  41. 'title' => 'Bulk Loader',
  42. 'description' => 'Templates for loading tab-delimited data',
  43. 'page callback' => 'tripal_bulk_loader_admin_template',
  44. 'access arguments' => array('administer site configuration'),
  45. 'type' => MENU_NORMAL_ITEM,
  46. );
  47. $items['admin/tripal/tripal_bulk_loader_template/configure'] = array(
  48. 'title' => 'Configure',
  49. 'description' => 'Configuration of global options related to bulk loading jobs',
  50. 'page callback' => 'drupal_get_form',
  51. 'page arguments' => array('tripal_bulk_loader_configuration_form'),
  52. 'access arguments' => array('administer site configuration'),
  53. 'type' => MENU_NORMAL_ITEM,
  54. );
  55. $items['admin/tripal/tripal_bulk_loader_template/manage_templates'] = array(
  56. 'title' => 'Manage Templates',
  57. 'description' => 'Create/Update/Delete/Import/Export Templates',
  58. 'page callback' => 'tripal_bulk_loader_admin_manage_templates',
  59. 'access arguments' => array('administer site configuration'),
  60. 'type' => MENU_NORMAL_ITEM,
  61. );
  62. $items['admin/tripal/tripal_bulk_loader_template/jobs'] = array(
  63. 'title' => 'Bulk Loader Jobs',
  64. 'description' => 'Listing of Bulk Loading Jobs',
  65. 'page callback' => 'tripal_bulk_loader_admin_jobs',
  66. 'access arguments' => array('administer site configuration'),
  67. 'type' => MENU_NORMAL_ITEM,
  68. );
  69. // Create/Edit Template --------
  70. $items['admin/tripal/tripal_bulk_loader_template/manage_templates/create'] = array(
  71. 'title' => 'Create Template',
  72. 'description' => 'Create loader template for loading tab-delimited data',
  73. 'page callback' => 'drupal_get_form',
  74. 'page arguments' => array('tripal_bulk_loader_modify_template_base_form', 'create'),
  75. 'access arguments' => array('administer site configuration'),
  76. 'type' => MENU_NORMAL_ITEM,
  77. );
  78. $items['admin/tripal/tripal_bulk_loader_template/manage_templates/edit'] = array(
  79. 'title' => 'Edit Template',
  80. 'description' => 'Edit loader template for loading tab-delimited data',
  81. 'page callback' => 'drupal_get_form',
  82. 'page arguments' => array('tripal_bulk_loader_modify_template_base_form', 'edit'),
  83. 'access arguments' => array('administer site configuration'),
  84. 'type' => MENU_NORMAL_ITEM,
  85. );
  86. $items['admin/tripal/tripal_bulk_loader_template/edit_record'] = array(
  87. 'title' => 'Edit Template Record',
  88. 'description' => 'Edit a record in an existing tripal bulk loader template.',
  89. 'page callback' => 'drupal_get_form',
  90. 'page arguments' => array('tripal_bulk_loader_edit_template_record_form'),
  91. 'access arguments' => array('administer site configuration'),
  92. 'type' => MENU_CALLBACK,
  93. );
  94. $items['admin/tripal/tripal_bulk_loader_template/add_field'] = array(
  95. 'title' => 'Add Template Field',
  96. 'description' => 'Add a template field to an existing tripal bulk loader template.',
  97. 'page callback' => 'drupal_get_form',
  98. 'page arguments' => array('tripal_bulk_loader_add_template_field_form'),
  99. 'access arguments' => array('administer site configuration'),
  100. 'type' => MENU_CALLBACK,
  101. );
  102. $items['admin/tripal/tripal_bulk_loader_template/edit_field'] = array(
  103. 'title' => 'Edit Template Field',
  104. 'description' => 'Edit an existing field from a tripal bulk loader template.',
  105. 'page callback' => 'drupal_get_form',
  106. 'page arguments' => array('tripal_bulk_loader_edit_template_field_form'),
  107. 'access arguments' => array('administer site configuration'),
  108. 'type' => MENU_CALLBACK,
  109. );
  110. // Delete Template -----
  111. $items['admin/tripal/tripal_bulk_loader_template/manage_templates/delete'] = array(
  112. 'title' => 'Delete Template',
  113. 'description' => 'Delete bulk loader template',
  114. 'page callback' => 'drupal_get_form',
  115. 'page arguments' => array('tripal_bulk_loader_delete_template_base_form'),
  116. 'access arguments' => array('administer site configuration'),
  117. 'type' => MENU_NORMAL_ITEM,
  118. );
  119. // Import/Export ---------
  120. $items['admin/tripal/tripal_bulk_loader_template/manage_templates/import'] = array(
  121. 'title' => 'Import Template',
  122. 'description' => 'Import Loaders',
  123. 'page callback' => 'drupal_get_form',
  124. 'page arguments' => array('tripal_bulk_loader_import_export_template_form', 'import'),
  125. 'access arguments' => array('administer site configuration'),
  126. 'type' => MENU_NORMAL_ITEM,
  127. );
  128. $items['admin/tripal/tripal_bulk_loader_template/manage_templates/export'] = array(
  129. 'title' => 'Export Template',
  130. 'description' => 'Export Loaders',
  131. 'page callback' => 'drupal_get_form',
  132. 'page arguments' => array('tripal_bulk_loader_import_export_template_form', 'export'),
  133. 'access arguments' => array('administer site configuration'),
  134. 'type' => MENU_NORMAL_ITEM,
  135. );
  136. // AHAH ---------
  137. $items['admin/tripal/tripal_bulk_loader_template/add_field_ahah'] = array(
  138. 'page callback' => 'tripal_bulk_loader_add_field_ahah',
  139. 'access arguments' => array('administer site configuration'),
  140. 'type' => MENU_CALLBACK,
  141. );
  142. $items['admin/tripal/tripal_bulk_loader_template/edit_field_ahah'] = array(
  143. 'page callback' => 'tripal_bulk_loader_edit_field_ahah',
  144. 'access arguments' => array('administer site configuration'),
  145. 'type' => MENU_CALLBACK,
  146. );
  147. return $items;
  148. }
  149. /**
  150. * Implements hook_theme
  151. */
  152. function tripal_bulk_loader_theme() {
  153. return array(
  154. 'tripal_bulk_loader_set_constants_form' => array(
  155. 'arguments' => array('form' => NULL),
  156. ),
  157. 'tripal_bulk_loader_template' => array(
  158. 'arguments' => array('template_id' => NULL),
  159. 'template' => 'tripal_bulk_loader_template'
  160. ),
  161. 'tripal_bulk_loader_modify_template_base_form' => array(
  162. 'arguments' => array('form' => NULL),
  163. 'template' => 'tripal_bulk_loader_modify_template_base_form',
  164. ),
  165. 'tripal_bulk_loader_edit_template_field_form' => array(
  166. 'arguments' => array('form' => NULL),
  167. 'template' => 'tripal_bulk_loader_edit_template_field_form',
  168. ),
  169. 'tripal_bulk_loader_add_template_field_form' => array(
  170. 'arguments' => array('form' => NULL),
  171. 'template' => 'tripal_bulk_loader_add_template_field_form',
  172. ),
  173. );
  174. }
  175. /**
  176. * Implements hook_access
  177. */
  178. function tripal_bulk_loader_access($op, $node, $account) {
  179. if ($op == 'create') {
  180. if (!user_access('create tripal_bulk_loader', $account)) {
  181. return FALSE;
  182. }
  183. }
  184. if ($op == 'update') {
  185. if (!user_access('edit tripal_bulk_loader', $account)) {
  186. return FALSE;
  187. }
  188. }
  189. if ($op == 'delete') {
  190. if (!user_access('delete tripal_bulk_loader', $account)) {
  191. return FALSE;
  192. }
  193. }
  194. if ($op == 'view') {
  195. if (!user_access('access tripal_bulk_loader', $account)) {
  196. return FALSE;
  197. }
  198. }
  199. return NULL;
  200. }
  201. /**
  202. * Implements hook_perm
  203. */
  204. function tripal_bulk_loader_perm() {
  205. return array(
  206. 'access tripal_bulk_loader',
  207. 'create tripal_bulk_loader',
  208. 'delete tripal_bulk_loader',
  209. 'edit tripal_bulk_loader',
  210. );
  211. }
  212. //////////////////////////////////////////////////////////////////////////////////////////////
  213. // Node Functions
  214. //////////////////////////////////////////////////////////////////////////////////////////////
  215. /**
  216. * Implements hook_node_info
  217. */
  218. function tripal_bulk_loader_node_info() {
  219. $nodes = array();
  220. $nodes['tripal_bulk_loader'] = array(
  221. 'name' => t('Bulk Loading Job'),
  222. 'module' => 'tripal_bulk_loader',
  223. 'description' => t('A bulk loader for inserting tab-delimited data into chado database'),
  224. 'has_title' => TRUE,
  225. 'has_body' => FALSE,
  226. 'locked' => TRUE
  227. );
  228. return $nodes;
  229. }
  230. /**
  231. * Implements node_form
  232. * Used to gather the extra details stored with a Bulk Loading Job Node
  233. */
  234. function tripal_bulk_loader_form($node, $form_state) {
  235. $form = array();
  236. if (isset($form_state['values'])) {
  237. $node = $form_state['values'] + (array)$node;
  238. $node = (object) $node;
  239. }
  240. $sql = "SELECT * FROM {tripal_bulk_loader_template}";
  241. $results = db_query($sql);
  242. $templates = array();
  243. while ($template = db_fetch_object ($results)) {
  244. $templates [$template->template_id] = $template->name;
  245. }
  246. if (!$templates) {
  247. $form['label'] = array(
  248. '#type' => 'item',
  249. '#description' => t("Loader template needs to be created before any bulk loader can be added. Go to 'Tripal Management > Bulk Loader Template' to create the template."),
  250. '#weight' => -10,
  251. );
  252. return $form;
  253. }
  254. $form['loader'] = array(
  255. '#type' => 'fieldset',
  256. '#title' => t('Basic Details'),
  257. );
  258. $form['loader']['loader_name'] = array(
  259. '#type' => 'textfield',
  260. '#title' => t('Loading Job Name'),
  261. '#weight' => -10,
  262. '#required' => TRUE,
  263. '#default_value' => $node->loader_name
  264. );
  265. $form['loader']['template_id'] = array(
  266. '#type' => 'select',
  267. '#title' => t('Template'),
  268. '#description' => t('Please specify a template for this loader'),
  269. '#options' => $templates,
  270. '#weight' => -9,
  271. '#required' => TRUE,
  272. '#default_value' => $node->template_id,
  273. );
  274. $form['loader']['file']= array(
  275. '#type' => 'textfield',
  276. '#title' => t('Data File'),
  277. '#description' => t('Please specify the data file to be loaded. This must be a tab-delimited text file with UNIX line endings.'),
  278. '#weight' => -8,
  279. '#default_value' => $node->file,
  280. '#maxlength' => 1024,
  281. );
  282. $form['loader']['has_header'] = array(
  283. '#type' => 'radios',
  284. '#title' => t('File has a Header'),
  285. '#options' => array( 1 => 'Yes', 2 => 'No'),
  286. '#weight' => -7,
  287. '#default_value' => $node->file_has_header,
  288. );
  289. $form['loader']['keep_track_inserted'] = array(
  290. '#type' => 'radios',
  291. '#title' => t('Keep track of inserted record IDs'),
  292. '#description' => t('This enables the ability to revert an entire loading job even if '
  293. .'it completed successfully. Furthermore, it displays the number of records '
  294. .'successfully inserted into each table.'),
  295. '#options' => array( 1 => 'Yes', 0 => 'No'),
  296. '#weight' => -7,
  297. '#default_value' => (isset($node->keep_track_inserted)) ? $node->keep_track_inserted : variable_get('tripal_bulk_loader_keep_track_inserted', FALSE),
  298. );
  299. return $form;
  300. }
  301. /**
  302. * Implements node_load
  303. */
  304. function tripal_bulk_loader_load($node) {
  305. $sql = "SELECT * FROM {tripal_bulk_loader} WHERE nid = %d";
  306. $node = db_fetch_object(db_query($sql, $node->nid));
  307. $node->title = 'Bulk Loading Job: ' . $node->loader_name;
  308. // Add job details
  309. $progress = tripal_bulk_loader_progess_file_get_progress($node->job_id);
  310. $sql = "SELECT * FROM {tripal_jobs} WHERE job_id=%d";
  311. $node->job = db_fetch_object(db_query($sql, $node->job_id));
  312. // Add the loader template
  313. $sql = "SELECT * FROM {tripal_bulk_loader_template} WHERE template_id=%d";
  314. $results = db_fetch_object(db_query($sql, $node->template_id));
  315. $template = unserialize($results->template_array);
  316. $node->template = $results;
  317. $node->template->template_array = $template;
  318. // Add inserted records
  319. $sql = 'SELECT * FROM {tripal_bulk_loader_inserted} WHERE nid=%d';
  320. $resource = db_query($sql, $node->nid);
  321. while ($r = db_fetch_object($resource)) {
  322. $r->num_inserted = sizeof(preg_split('/,/', $r->ids_inserted));
  323. $node->inserted_records->{$r->table_inserted_into} = $r;
  324. }
  325. // Add exposed field list
  326. $node->exposed_fields = array();
  327. if ($template) {
  328. foreach ($template as $record_id => $record) {
  329. foreach ($record['fields'] as $field_id => $field) {
  330. if ($field['exposed']) {
  331. $node->exposed_fields[] = array(
  332. 'record_id' => $record_id,
  333. 'field_id' => $field_id,
  334. 'title' => $field['title'],
  335. );
  336. }
  337. }
  338. }
  339. if (empty($node->exposed_fields)) {
  340. $node->exposed_fields[] = array();
  341. }
  342. }
  343. // Add constants
  344. $sql = 'SELECT * FROM {tripal_bulk_loader_constants} WHERE nid=%d ORDER BY group_id, record_id, field_id';
  345. $resource = db_query($sql, $node->nid);
  346. while ($r = db_fetch_object($resource)) {
  347. $node->constants[$r->group_id][$r->record_id][$r->field_id] = array(
  348. 'constant_id' => $r->constant_id,
  349. 'group_id' => $r->group_id,
  350. 'chado_table' => $r->chado_table,
  351. 'chado_field' => $r->chado_field,
  352. 'record_id' => $r->record_id,
  353. 'field_id' => $r->field_id,
  354. 'value' => $r->value
  355. );
  356. }
  357. if (!$node->constants) {
  358. $node->constants[] = array();
  359. }
  360. return $node;
  361. }
  362. /**
  363. * Implements node_insert
  364. * Insert the data from the node form on Create content
  365. */
  366. function tripal_bulk_loader_insert($node) {
  367. // Insert into tripal_bulk_loader
  368. $sql = "INSERT INTO {tripal_bulk_loader} (nid, loader_name, template_id, file, file_has_header, job_status, keep_track_inserted) VALUES (%d, '%s', %d, '%s', %d, '%s', %d)";
  369. db_query($sql, $node->nid, $node->loader_name, $node->template_id, $node->file, $node->has_header, 'Initialized', $node->keep_track_inserted);
  370. // Update title
  371. $node->title =$node->loader_name;
  372. drupal_write_record('node', $node, 'nid');
  373. drupal_write_record('node_revision', $node, 'nid');
  374. drupal_set_message(t('After reviewing the details, please Submit this Job (by clicking the "Submit Job" button below). No data will be loaded until the submitted job is reached in the queue.'));
  375. }
  376. /**
  377. * Implements node_delete
  378. * Deletes the data when the delete button on the node form is clicked
  379. */
  380. function tripal_bulk_loader_delete($node) {
  381. $sql = "DELETE FROM {tripal_bulk_loader} WHERE nid = %d";
  382. db_query($sql, $node->nid);
  383. }
  384. /**
  385. * Implements node_update
  386. * Updates the data submitted by the node form on edit
  387. */
  388. function tripal_bulk_loader_update($node) {
  389. // Update tripal_bulk_loader
  390. $sql = "UPDATE {tripal_bulk_loader} SET nid = %d, loader_name = '%s', template_id = %d, file = '%s', file_has_header = '%s', keep_track_inserted = %d WHERE nid = %d";
  391. db_query($sql, $node->nid, $node->loader_name, $node->template_id, $node->file, $node->has_header, $node->keep_track_inserted, $node->nid);
  392. // Add a job if the user want to load the data
  393. global $user;
  394. if ($node->job) {
  395. $job_args[0] =$node->loader_name;
  396. $job_args[1] = $node->template_id;
  397. $job_args[2] = $node->file;
  398. if (is_readable($node->file)) {
  399. $fname = preg_replace("/.*\/(.*)/", "$1", $node->file);
  400. tripal_add_job("Bulk Load: $fname", 'tripal_bulk_loader', 'tripal_bulk_loader_load_data', $job_args, $user->uid);
  401. }
  402. else {
  403. drupal_set_message(t("Can not open %file. Job not scheduled.", array('%file' => $node->file)));
  404. }
  405. }
  406. }
  407. ///////////////////////////////////////////////////////////
  408. /**
  409. * Preprocessor function for the tripal_bulk_loader template
  410. */
  411. function tripal_bulk_loader_preprocess_tripal_bulk_loader_template(&$variables) {
  412. $sql = "SELECT * FROM {tripal_bulk_loader_template} WHERE template_id=%d";
  413. $template = db_fetch_object(db_query($sql, $variables['template_id']));
  414. $template->template_array = unserialize($template->template_array);
  415. $variables['template'] = $template;
  416. }
  417. /**
  418. * Get the progress of the current constant set from the progress file
  419. *
  420. * When transactions are used, database updates to drupal cannot be made. Thus a separate
  421. * method to keep track of progress was implemented: save a period to the file for each
  422. * record successfully inserted; each line in the file represents a processed line.
  423. *
  424. * @param $job_id
  425. * The id of the tripal job to check the progress of
  426. * @param $node
  427. * The tripal_bulk_loader node associated with the job
  428. *
  429. * @return
  430. * An array with the following keys:
  431. * num_lines = the number of lines in the file processed so far
  432. * total_lines = the total number of lines in the input file
  433. * percent_file = the percent the input file has been loaded
  434. * num_records = the number of records successfully inserted
  435. */
  436. function tripal_bulk_loader_progess_file_get_progress($job_id, $update_progress = TRUE) {
  437. $filename = '/tmp/tripal_bulk_loader_progress-' . $job_id . '.out';
  438. if (!file_exists($filename)) {
  439. return (object) array();
  440. }
  441. $num_lines = trim(`wc --lines < $filename`);
  442. $num_records = trim(`grep -o "." $filename | wc --lines`);
  443. $job = db_fetch_object(db_query("SELECT j.*, b.file, b.file_has_header, c.num as num_constant_sets
  444. FROM {tripal_jobs} j
  445. LEFT JOIN {tripal_bulk_loader} b ON b.job_id=j.job_id
  446. LEFT JOIN (
  447. SELECT nid, count(distinct(group_id)) as num
  448. FROM {tripal_bulk_loader_constants}
  449. GROUP BY nid
  450. ) c ON c.nid=b.nid
  451. WHERE j.job_id=%d", $job_id));
  452. if ($job->num_constant_sets) {
  453. $num_constant_sets_loaded = round($job->progress / (100 / $job->num_constant_sets), 4);
  454. // If the next constant set has started loading
  455. if ($job->num_constant_sets != $num_constant_sets_loaded) {
  456. // total lines in input file
  457. $total_lines = trim(`wc --lines < $job->file`);
  458. if ($job->file_has_header) {
  459. $total_lines--;
  460. }
  461. // percent of the current constant set loaded
  462. $percent = round($num_lines/$total_lines * 100, 2);
  463. // percent of the total job = (<# fully loaded constant sets> * 100 )
  464. // + <percent of current constant set>
  465. // / <total number of constant sets>
  466. $total_percent = (($num_constant_sets_loaded * 100) + $percent) / $job->num_constant_sets;
  467. // update the progress of the job
  468. if ($update_progress AND ($percent != 0 OR $percent != 100)) {
  469. tripal_job_set_progress($job_id, round($total_percent, 0));
  470. }
  471. }
  472. }
  473. return (object) array(
  474. 'num_lines' => $num_lines,
  475. 'total_lines' => $total_lines,
  476. 'percent_file' => $percent,
  477. 'num_constant_sets_loaded' => $num_constant_sets_loaded,
  478. 'total_percent' => $total_percent,
  479. 'num_records' => $num_records
  480. );
  481. }
  482. /**
  483. * Implements hook_job_describe_args()
  484. * Specifically to make viewing past tripal jobs more readable for jobs registered by this module
  485. *
  486. * @params $callback
  487. * The callback passed into tripal_add_job()
  488. * @param $args
  489. * The arguements passed into tripal_add_job()
  490. * @return
  491. * An array where keys are the human readable headers describing each arguement
  492. * and the value is the aguement passed in after formatting
  493. */
  494. function tripal_bulk_loader_job_describe_args($callback, $args) {
  495. $new_args = array();
  496. if ($callback == 'tripal_bulk_loader_load_data') {
  497. //1st arg is the nid for a bulk loader node
  498. $node = node_load($args[0]);
  499. $new_args['Bulk Loading Job'] = l($node->title, 'node/' . $args[0]);
  500. return $new_args;
  501. }
  502. }
  503. /**
  504. * Implements hook_coder_ignore().
  505. * Defines the path to the file (tripal_bulk_loader.coder_ignores.txt) where ignore rules for coder are stored
  506. */
  507. function tripal_bulk_loader_coder_ignore() {
  508. return array(
  509. 'path' => drupal_get_path('module', 'tripal_bulk_loader'),
  510. 'line prefix' => drupal_get_path('module', 'tripal_bulk_loader'),
  511. );
  512. }