浏览代码

Delete test lines, also fix the issue of can not delete vcf track from json file.

Jiu9Shen 5 年之前
父节点
当前提交
caf79b9f9d

+ 3 - 3
tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt_commands.inc

@@ -75,8 +75,9 @@ function tripal_jbrowse_mgmt_cmd_add_track($track) {
         $index_name = glob($track->file . '/' . '*.vcf.gz.[tci][bsd][ix]')[0];
       }
       $file_name = pathinfo($file_name)['basename'];
+
       $track_in_json = [
-        'label' => $track->label,
+        'label' => tripal_jbrowse_mgmt_make_slug($track->label),
         'key' => $track->label,
         'urlTemplate' => $directory . '/' . $file_name,
         'type' => $track->track_type,
@@ -99,9 +100,8 @@ function tripal_jbrowse_mgmt_cmd_add_track($track) {
             break;
         }
       }
-      dpm($track_in_json, '$track_in_json');
+
       $json['tracks'][] = $track_in_json;
-      dpm($json, '$json');
       tripal_jbrowse_mgmt_save_json($instance, $json);
       break;
 

+ 0 - 1
tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt_tracks.form.inc

@@ -161,7 +161,6 @@ function tripal_jbrowse_mgmt_add_track_form_validate($form, &$form_state) {
           else {
             $file_gz = glob($local_dir . '/*.vcf.gz');
             $file_index = glob($local_dir . '/*.vcf.gz.[cti][sbd][ix]');
-            dpm($file_index, '$file_index');
             if (count($file_gz) != 1 || count($file_index) != 1) {
               form_set_error('file_path',
                 'Please provide a directory with exactly one gz and one index file.');