@@ -160,7 +160,7 @@ Parameters:
160160*/
161161
162162process fetchTestData {
163- // Cache in a dedicated cache directory, not input_folder
163+ // Cache in a dedicated cache directory
164164 storeDir " ${ params.test_data_cache ?: "${launchDir}/.test-datasets"} "
165165 tag " fetch data from ${ url} "
166166
@@ -482,20 +482,25 @@ workflow {
482482 // Fetch test dataset from remote URL
483483 log. info " Fetching test dataset from: ${ params.test_data_url} "
484484 input_folder_path = fetchTestData(params. test_data_url)
485- } else {
486- input_folder_path = Channel . value(params. input_folder)
487- }
488485
489- // Set up all channels based on the single input folder
490- proteome_folder = input_folder_path. map { " ${ it} /proteome" }
491- proteomes = input_folder_path. flatMap{ dir ->
492- file(" ${ dir} /proteome" ). listFiles(). findAll {
493- it. name. endsWith(' .fa' ) || it. name. endsWith(' .fasta' )
486+ // Set up all channels based on the downloaded folder structure
487+ proteome_folder = input_folder_path. map { " ${ it} /proteome" }
488+ proteomes = input_folder_path. flatMap { dir ->
489+ file(" ${ dir} /proteome" ). listFiles(). findAll {
490+ it. name. endsWith(' .fa' ) || it. name. endsWith(' .fasta' ) || it. name. endsWith(' .faa' )
491+ }
494492 }
493+ species_tree = input_folder_path. map { " ${ it} /species_tree.nwk" }
494+ splice_folder = input_folder_path. map { " ${ it} /splice" }
495+ hogmap_in = input_folder_path. map { " ${ it} /hogmap_in" }
496+ } else {
497+ // Local/custom dataset - allow parameter overrides
498+ proteome_folder = Channel . value(params. proteome_folder)
499+ proteomes = Channel . fromPath(" ${ params.proteome_folder} /*.{fa,fasta}" , checkIfExists : true )
500+ species_tree = Channel . value(params. species_tree)
501+ splice_folder = Channel . value(params. splice_folder)
502+ hogmap_in = Channel . value(params. hogmap_in)
495503 }
496- species_tree = input_folder_path. map { " ${ it} /species_tree.nwk" }
497- splice_folder = input_folder_path. map { " ${ it} /splice" }
498- hogmap_in = input_folder_path. map { " ${ it} /hogmap_in" }
499504
500505 // Static channels
501506 omamerdb = Channel . fromPath(params. omamer_db)
0 commit comments