comparison 0.5.0/workflows/nowayout.nf @ 8:3539fbeb4230

planemo upload
author kkonganti
date Tue, 01 Apr 2025 10:27:25 -0400
parents 97cd2f532efe
children 9c603577838a
comparison
equal deleted inserted replaced
7:a5055946f9c2 8:3539fbeb4230
299 299
300 def checkMetadataExists(file_path, msg) { 300 def checkMetadataExists(file_path, msg) {
301 file_path_obj = file( file_path ) 301 file_path_obj = file( file_path )
302 302
303 if (msg.toString().find(/(?i)KMA/)) { 303 if (msg.toString().find(/(?i)KMA/)) {
304 if (!file_path_obj.parent.exists() || file_path_obj.parent.size() == 0) { 304 if (!file_path_obj.parent.exists()) {
305 stopNow("Please check if your ${msg}\n" + 305 stopNow("Please check if your ${msg}\n" +
306 "[ ${file_path} ]\nexists and that the files are not of size 0.") 306 "[ ${file_path} ]\nexists and that the files are not of size 0.")
307 } 307 }
308
309 // Check if db files within parent path are empty.
310 file_path_obj.eachFileRecurse {
311 if (it.size() == 0) {
312 stopNow("For ${msg}, within\n" +
313 "[ ${file_path} ],\nthe following file is of size 0: ${it.name}")
314 }
315 }
316
308 } 317 }
309 else if (!file_path_obj.exists() || file_path_obj.size() == 0) { 318 else if (!file_path_obj.exists() || file_path_obj.size() == 0) {
310 stopNow("Please check if your ${msg} file\n" + 319 stopNow("Please check if your ${msg} file\n" +
311 "[ ${file_path} ]\nexists and is not of size 0.") 320 "[ ${file_path} ]\nexists and is not of size 0.")
312 } 321 }