File tree Expand file tree Collapse file tree 3 files changed +29
-7
lines changed Expand file tree Collapse file tree 3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ params {
2020 test_upload = true
2121 webincli_submit = true
2222 db_zenodo_id = ' 14897628'
23+ db_zenodo_path = null
2324
2425 // MultiQC options
2526 multiqc_config = null
Original file line number Diff line number Diff line change 262262 {
263263 "$ref" : " #/$defs/pipeline_options"
264264 }
265- ]
265+ ],
266+ "properties" : {
267+ "db_zenodo_id" : {
268+ "type" : " string" ,
269+ "default" : 14897628
270+ },
271+ "db_zenodo_path" : {
272+ "type" : " string"
273+ }
274+ }
266275}
Original file line number Diff line number Diff line change @@ -35,18 +35,30 @@ workflow GENOMESUBMIT {
3535 def col7 = row[6 ]
3636 def col8 = row[7 ]
3737 def col9 = row[8 ]
38- def missing = (! col7 || ! col8 || ! col9 || col7 == [] || col8 == [] || col9 == [])
39- incomplete : missing
40- complete : ! missing
38+ def checkM2_missing = (! col7 || ! col8 || ! col9 || col7 == [] || col8 == [] || col9 == [])
39+ incomplete : checkM2_missing
40+ complete : ! checkM2_missing
41+ }
42+ // Run checkM2 database download if any completeness/contamination values are missing & no db path provided
43+ if (params. db_zenodo_path == null ) {
44+ CHECKM2_DATABASEDOWNLOAD (params. db_zenodo_id)
45+ ch_check2_db = CHECKM2_DATABASEDOWNLOAD . out. database
46+ }
47+ else {
48+ // Create a tuple that matches the expected structure from CHECKM2_DATABASEDOWNLOAD
49+ ch_check2_db = Channel . of(
50+ [
51+ [id : " db_zenodo_meta" ],
52+ file(params. db_zenodo_path),
53+ ]
54+ )
4155 }
42- // Run checkM2 database download if any completeness/contamination values are provided
43- CHECKM2_DATABASEDOWNLOAD (params. db_zenodo_id)
4456
4557 CHECKM2_PREDICT (
4658 branched. incomplete. map { row ->
4759 [row[0 ], file(row[1 ])]
4860 },
49- CHECKM2_DATABASEDOWNLOAD . out . database ,
61+ ch_check2_db ,
5062 )
5163
5264
You can’t perform that action at this time.
0 commit comments