diff --git a/nf-test.config b/nf-test.config index e92f96b..f65ae9b 100644 --- a/nf-test.config +++ b/nf-test.config @@ -3,7 +3,7 @@ config { testsDir "tests/" // nf-test directory including temporary files for each test - workDir "/tmp" + workDir ".nf-test" // location of library folder that is added automatically to the classpath libDir "lib/" diff --git a/tests/test.nf.test b/tests/test.nf.test index 6b4e9a8..c71affb 100644 --- a/tests/test.nf.test +++ b/tests/test.nf.test @@ -18,11 +18,22 @@ nextflow_pipeline { assertAll( { assert workflow.success }, { assert snapshot( - path("$outputDir/diamond/database.dmnd"), - path("$outputDir/kaiju/database.fmi"), - ).match() }, + path("$outputDir/diamond/database.dmnd"), + path("$outputDir/kaiju/database.fmi"), + path("$outputDir/malt/malt-build.log").readLines().last().contains('Peak memory'), + path("$outputDir/malt/malt_index/index0.idx"), + path("$outputDir/malt/malt_index/ref.db"), + path("$outputDir/malt/malt_index/ref.idx"), + path("$outputDir/malt/malt_index/ref.inf"), + path("$outputDir/malt/malt_index/taxonomy.idx"), + path("$outputDir/malt/malt_index/taxonomy.map"), + path("$outputDir/malt/malt_index/taxonomy.tre") + ).match() + }, { assert new File("$outputDir/pipeline_info/software_versions.yml").exists() }, - { assert new File("$outputDir/multiqc/multiqc_report.html").exists() } + { assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, + { assert path("$outputDir/malt/malt_index/table0.db").exists() }, + { assert path("$outputDir/malt/malt_index/table0.idx").exists() }, ) } } diff --git a/tests/test.nf.test.snap b/tests/test.nf.test.snap index 21c8776..32337b6 100644 --- a/tests/test.nf.test.snap +++ b/tests/test.nf.test.snap @@ -2,8 +2,20 @@ "test_profile": { "content": [ "database.dmnd:md5,9d57aa88cd1766adfda8360876fc0e4f", - "database.fmi:md5,54fd89f5e4eab61af30175e8aa389598" + "database.fmi:md5,54fd89f5e4eab61af30175e8aa389598", + true, + "index0.idx:md5,876139dc930e68992cd2625e08bba48a", + "ref.db:md5,335d4c8c7367999d79bef51882809f5f", + "ref.idx:md5,a07f93cdce0154d3e05e8cacc5480a3a", + "ref.inf:md5,446275f4f879e2b115e983db7c9ced18", + "taxonomy.idx:md5,309f2a558c08f551fc939e749fd42fd8", + "taxonomy.map:md5,5bb3f2192e925bca2e61e4b54f1671e0", + "taxonomy.tre:md5,f76fb2d5aa9b0d637234d48175841e0e" ], - "timestamp": "2023-12-14T12:55:54.070245428" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-08T10:59:42.922218767" } } \ No newline at end of file diff --git a/workflows/createtaxdb.nf b/workflows/createtaxdb.nf index 37577c6..ac207f5 100644 --- a/workflows/createtaxdb.nf +++ b/workflows/createtaxdb.nf @@ -111,7 +111,6 @@ workflow CREATETAXDB { ch_versions = ch_versions.mix(CAT_CAT_DNA.out.versions.first()) } - // TODO: COPY COMPRESSION PROCEDURE ABOVE BUT FOR AA! // TODO: Possibly need to have a modification step to get header correct to actually run with kaiju... // TEST first! // docs: https://github.com/bioinformatics-centre/kaiju#custom-database @@ -144,8 +143,6 @@ workflow CREATETAXDB { // MODULE: Run DIAMOND/MAKEDB // - // TODO - // - nf-test if ( params.build_diamond ) { DIAMOND_MAKEDB ( CAT_CAT_AA.out.file_out, params.prot2taxid, params.nodesdmp, params.namesdmp ) ch_versions = ch_versions.mix(DIAMOND_MAKEDB.out.versions.first()) @@ -173,8 +170,6 @@ workflow CREATETAXDB { ch_malt_mapdb = file(params.malt_mapdb) } - ch_input_for_malt - if ( params.malt_sequencetype == 'Protein') { ch_input_for_malt = ch_prepped_aa_fastas.map{ meta, file -> file } } else { @@ -209,6 +204,15 @@ workflow CREATETAXDB { ch_multiqc_logo.toList() ) multiqc_report = MULTIQC.out.report.toList() + + emit: + versions = CUSTOM_DUMPSOFTWAREVERSIONS.out.versions + multiqc_report_html = MULTIQC.out.report + diamond_database = DIAMOND_MAKEDB.out.db + kaiju_database = KAIJU_MKFMI.out.fmi + malt_database = MALT_BUILD.out.index + + } /*