Pārlūkot izejas kodu

include new file type and track type in track file.

Jiu9Shen 5 gadi atpakaļ
vecāks
revīzija
a60cf92b85

+ 19 - 0
tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt.api.inc

@@ -710,3 +710,22 @@ function tripal_jbrowse_mgmt_get_instance_properties($id) {
     ->condition('instance_id', $id)
     ->execute()->fetchAllKeyed(0,1);
 }
+
+
+/**
+ * validate folder upload (file with index)
+ * eg. vcf, bam, cram
+ *
+ * @param $file
+ *   the path and file name of upload file
+ * @param $index
+ *   the path and file name of upload file
+ * @param $local_directory
+ *   the path and file name of upload file
+ * @return
+ *   warning message or NULL if no warning
+ */
+
+ function tripal_jbrowse_mgmt_validate_folder_upload($file, $index, $local_directory) {
+
+ }

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

@@ -139,6 +139,9 @@ function tripal_jbrowse_mgmt_add_track_form_validate($form, &$form_state) {
   if ($file_type === 'vcf') {
     $path = $base_path . '/vcf';
   }
+  if (($file_type === 'bam') OR ($file_type === 'cram')){
+    $path = $base_path . '/bam';
+  }
   elseif ($file_type === 'bw') {
     $path = $base_path . '/wig';
   }