|
| 1 | +version 1.2 |
| 2 | + |
| 3 | +workflow fticrmsNOM { |
| 4 | + input { |
| 5 | + String? docker_image # Optional input for Docker image |
| 6 | + } |
| 7 | + |
| 8 | + call runDirectInfusion { |
| 9 | + input: |
| 10 | + docker_image = docker_image |
| 11 | + } |
| 12 | +
|
| 13 | + output { |
| 14 | + String out = runDirectInfusion.out |
| 15 | + Array[File] output_files = runDirectInfusion.output_files |
| 16 | + Array[File] van_krevelen_plots = runDirectInfusion.van_krevelen_plots |
| 17 | + Array[File] dbe_vs_c_plots = runDirectInfusion.dbe_vs_c_plots |
| 18 | + Array[File] ms_class_plots = runDirectInfusion.ms_class_plots |
| 19 | + Array[File] mz_error_class_plots = runDirectInfusion.mz_error_class_plots |
| 20 | + Array[File] qc_plots = runDirectInfusion.qc_plots |
| 21 | + } |
| 22 | +} |
| 23 | + |
| 24 | +task runDirectInfusion { |
| 25 | + input { |
| 26 | + Array[Directory] file_paths |
| 27 | + String output_directory |
| 28 | + String output_type |
| 29 | + File corems_toml_path |
| 30 | + String polarity |
| 31 | + Int raw_file_start_scan |
| 32 | + Int raw_file_final_scan |
| 33 | + Boolean is_centroid |
| 34 | + File calibration_ref_file_path |
| 35 | + Boolean calibrate |
| 36 | + Boolean batch_calibrate |
| 37 | + Boolean plot_mz_error |
| 38 | + Boolean plot_ms_assigned_unassigned |
| 39 | + Boolean plot_c_dbe |
| 40 | + Boolean plot_van_krevelen |
| 41 | + Boolean plot_ms_classes |
| 42 | + Boolean plot_mz_error_classes |
| 43 | + Boolean plot_qc |
| 44 | + Int jobs_count = 1 |
| 45 | + String? docker_image |
| 46 | + } |
| 47 | + |
| 48 | + command { |
| 49 | + enviroMS run_di_wdl \ |
| 50 | + ${sep=',' file_paths} \ |
| 51 | + ${output_directory} \ |
| 52 | + ${output_type} \ |
| 53 | + ${corems_toml_path} \ |
| 54 | + ${polarity} \ |
| 55 | + ${raw_file_start_scan} \ |
| 56 | + ${raw_file_final_scan} \ |
| 57 | + ${is_centroid} \ |
| 58 | + ${calibration_ref_file_path} \ |
| 59 | + -c ${calibrate} \ |
| 60 | + -bc ${batch_calibrate} \ |
| 61 | + -e ${plot_mz_error} \ |
| 62 | + -a ${plot_ms_assigned_unassigned} \ |
| 63 | + -cb ${plot_c_dbe} \ |
| 64 | + -vk ${plot_van_krevelen} \ |
| 65 | + -mc ${plot_ms_classes} \ |
| 66 | + -ec ${plot_mz_error_classes} \ |
| 67 | + -qc ${plot_qc} \ |
| 68 | + --jobs ${jobs_count} |
| 69 | + } |
| 70 | + |
| 71 | + output { |
| 72 | + String out = read_string(stdout()) |
| 73 | + Array[File] output_files = glob('${output_directory}/**/*.*') |
| 74 | + Array[File] van_krevelen_plots = glob('${output_directory}/**/van_krevelen/*.*') |
| 75 | + Array[File] dbe_vs_c_plots = glob('${output_directory}/**/dbe_vs_c/*.*') |
| 76 | + Array[File] ms_class_plots = glob('${output_directory}/**/ms_class/*.*') |
| 77 | + Array[File] mz_error_class_plots = glob('${output_directory}/**/mz_error_class/*.*') |
| 78 | + Array[File] qc_plots = glob('${output_directory}/**/qc_plots/*.*') |
| 79 | + } |
| 80 | + |
| 81 | + runtime { |
| 82 | + docker: "~{if defined(docker_image) then docker_image else 'microbiomedata/enviroms:5.1.0'}" |
| 83 | + } |
| 84 | +} |
0 commit comments