diff --git a/CHANGELOG.md b/CHANGELOG.md index 704489e..b5f894b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.4.0+dev - [23-Aug-2024] +## 0.4.0+dev - [11-Sep-2024] ### `Added` @@ -19,15 +19,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 10. Added param `enforce_full_intron_support` to turn on/off strict model purging by TSEBRA [#21](https://github.com/plant-food-research-open/genepal/issues/21) 11. Added param `filter_liftoff_by_hints` to evaluate liftoff models with TSEBRA to make sure they have the same level of evidence as BRAKER [#28](ttps://github.com/plant-food-research-open/genepal/issues/28) 12. Added a script to automatically check module version updates -13. Updated modules: `AGAT/CONVERTSPGFF2GTF`, `CAT_FASTQ`, `CUSTOM/DUMPSOFTWAREVERSIONS`, `EGGNOGMAPPER`, `FASTP`, `GFFREAD`, `SAMTOOLS/CAT`, `CUSTOM/RESTOREGFFIDS`, `CUSTOM/SHORTENFASTAIDS`, `EDTA/EDTA`, `CAT/CAT`, `FASTQC`, `GUNZIP`, `LIFTOFF`, `STAR/ALIGN`, `STAR/GENOMEGENERATE`, `UMITOOLS/EXTRACT`, -14. Updated sub-workflows: `FASTQ_FASTQC_UMITOOLS_FASTP` and `FASTA_EDTA_LAI` -15. Reduced `BRAKER3` threads to 8 [#55](https://github.com/plant-food-research-open/genepal/issues/55) -16. Now the final annotations are stored in the `annotations` folder [#53](https://github.com/plant-food-research-open/genepal/issues/53) -17. Added `-gff` flag to `REPEATMASKER` to save the gff file [#54](https://github.com/plant-food-research-open/genepal/issues/54) -18. Now a single `fasta` file can be directly specified for `protein_evidence` -19. `eggnogmapper_db_dir` is not a required parameter anymore -20. `eggnogmapper_tax_scope` is now set to 1 (root div) by default -21. Added a `test` profile based on public data +13. Reduced `BRAKER3` threads to 8 [#55](https://github.com/plant-food-research-open/genepal/issues/55) +14. Now the final annotations are stored in the `annotations` folder [#53](https://github.com/plant-food-research-open/genepal/issues/53) +15. Added `-gff` flag to `REPEATMASKER` to save the gff file [#54](https://github.com/plant-food-research-open/genepal/issues/54) +16. Now a single `fasta` file can be directly specified for `protein_evidence` +17. `eggnogmapper_db_dir` is not a required parameter anymore +18. `eggnogmapper_tax_scope` is now set to 1 (root div) by default +19. Added a `test` profile based on public data +20. Updated modules and sub-workflows ### `Fixed` diff --git a/README.md b/README.md index 3f14e6a..ef4c3ba 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ First, prepare an assemblysheet with your input genomes that looks as follows: `assemblysheet.csv`: ```csv -tag,fasta,is_masked -a_thaliana,/path/to/genome.fa,yes +tag ,fasta ,is_masked +a_thaliana ,/path/to/genome.fa ,yes ``` Each row represents an input genome and the fields are: diff --git a/docs/parameters.md b/docs/parameters.md index 3e293ad..6de7e25 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -109,4 +109,4 @@ Less common options for the pipeline, typically set in a config file. | `validationShowHiddenParams` | Show all params when using `--help` | `boolean` | | | True | | `validationFailUnrecognisedParams` | Validation of parameters fails when an unrecognised parameter is found. | `boolean` | | | True | | `validationLenientMode` | Validation of parameters in lenient more. | `boolean` | | | True | -| `pipelines_testdata_base_path` | | `string` | https://raw.githubusercontent.com/nf-core/test-datasets/ | | True | +| `pipelines_testdata_base_path` | Base path for pipeline test datasets | `string` | https://raw.githubusercontent.com/nf-core/test-datasets/ | | True | diff --git a/modules.json b/modules.json index d77d640..cb588f6 100644 --- a/modules.json +++ b/modules.json @@ -87,123 +87,122 @@ "nf-core": { "agat/convertspgff2gtf": { "branch": "master", - "git_sha": "0a0b723d114e502207072603479b635dfbc2bf59", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "agat/convertspgxf2gxf": { "branch": "master", - "git_sha": "0a0b723d114e502207072603479b635dfbc2bf59", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "agat/spfilterfeaturefromkilllist": { "branch": "master", - "git_sha": "d1535889747781d919bc81da2344952f4bfa2be4", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "agat/spmergeannotations": { "branch": "master", - "git_sha": "8e30f5d09155b45ddafc2d1357fc5f447f1aaa03", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "cat/cat": { "branch": "master", - "git_sha": "5bb8ca085e17549e185e1823495ab8d20727a805", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "eggnogmapper": { "branch": "master", - "git_sha": "b34fb117e397e72a070cde8adf21b758670c90f5", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "fastavalidator": { "branch": "master", - "git_sha": "90dad5491658049282ceb287a3d7732c1ce39837", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "fastp": { "branch": "master", - "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["fastq_fastqc_umitools_fastp"] }, "fastqc": { "branch": "master", - "git_sha": "b49b8992e5271ce427f3a7cdb29628fc58400eb5", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["fastq_fastqc_umitools_fastp", "modules"] }, "gffcompare": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "gffread": { "branch": "master", - "git_sha": "6c996d7fbe0816dcbb68ce587ad5f873313682a1", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "gt/gff3": { "branch": "master", - "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "gunzip": { "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": ["modules"], - "patch": "modules/nf-core/gunzip/gunzip.diff" + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", + "installed_by": ["modules"] }, "liftoff": { "branch": "master", - "git_sha": "b34fb117e397e72a070cde8adf21b758670c90f5", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "orthofinder": { "branch": "master", - "git_sha": "07f10f34d88408af7c71f13227d11f23b7f53b50", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "repeatmodeler/builddatabase": { "branch": "master", - "git_sha": "52507581f62929f98dd6e6c5c5824583fa6ef94d", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "repeatmodeler/repeatmodeler": { "branch": "master", - "git_sha": "52507581f62929f98dd6e6c5c5824583fa6ef94d", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "samtools/cat": { "branch": "master", - "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "sortmerna": { "branch": "master", - "git_sha": "df05c8db5195867c0bc7b92c1788115b66f0d17d", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "star/align": { "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "star/genomegenerate": { "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "tsebra": { "branch": "master", - "git_sha": "0995f9cd0cc5e4eb60f7870280b75ecdb5ab0db2", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["modules"] }, "umitools/extract": { "branch": "master", - "git_sha": "b4919e9a2b4d8b71061e601633db4600a3858fa1", + "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", "installed_by": ["fastq_fastqc_umitools_fastp"] } } @@ -217,12 +216,12 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "d20fb2a9cc3e2835e9d067d1046a63252eb17352", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", + "git_sha": "2fdce49d30c0254f76bc0f13c55c17455c1251ab", "installed_by": ["subworkflows"] }, "utils_nfvalidation_plugin": { diff --git a/modules/nf-core/agat/convertspgff2gtf/environment.yml b/modules/nf-core/agat/convertspgff2gtf/environment.yml index 6747331..0410ee7 100644 --- a/modules/nf-core/agat/convertspgff2gtf/environment.yml +++ b/modules/nf-core/agat/convertspgff2gtf/environment.yml @@ -1,7 +1,5 @@ -name: agat_convertspgff2gtf channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::agat=1.4.0 diff --git a/modules/nf-core/agat/convertspgxf2gxf/environment.yml b/modules/nf-core/agat/convertspgxf2gxf/environment.yml index 6ed34fa..0410ee7 100644 --- a/modules/nf-core/agat/convertspgxf2gxf/environment.yml +++ b/modules/nf-core/agat/convertspgxf2gxf/environment.yml @@ -1,7 +1,5 @@ -name: agat_convertspgxf2gxf channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::agat=1.4.0 diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml b/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml index fb2df48..a6b5f2b 100644 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml +++ b/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spfilterfeaturefromkilllist" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::agat=1.4.0" diff --git a/modules/nf-core/agat/spmergeannotations/environment.yml b/modules/nf-core/agat/spmergeannotations/environment.yml index 5644e08..a6b5f2b 100644 --- a/modules/nf-core/agat/spmergeannotations/environment.yml +++ b/modules/nf-core/agat/spmergeannotations/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spmergeannotations" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::agat=1.4.0" diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml index 17a04ef..9b01c86 100644 --- a/modules/nf-core/cat/cat/environment.yml +++ b/modules/nf-core/cat/cat/environment.yml @@ -1,7 +1,5 @@ -name: cat_cat channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::pigz=2.3.4 diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml index 8c69b12..c7eb9bd 100644 --- a/modules/nf-core/cat/fastq/environment.yml +++ b/modules/nf-core/cat/fastq/environment.yml @@ -1,7 +1,5 @@ -name: cat_fastq channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::coreutils=8.30 diff --git a/modules/nf-core/eggnogmapper/environment.yml b/modules/nf-core/eggnogmapper/environment.yml index f4fb6fd..2092ea5 100644 --- a/modules/nf-core/eggnogmapper/environment.yml +++ b/modules/nf-core/eggnogmapper/environment.yml @@ -1,7 +1,5 @@ -name: eggnogmapper channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::eggnog-mapper=2.1.12 diff --git a/modules/nf-core/fastavalidator/environment.yml b/modules/nf-core/fastavalidator/environment.yml index 70f346e..44d55c1 100644 --- a/modules/nf-core/fastavalidator/environment.yml +++ b/modules/nf-core/fastavalidator/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "fastavalidator" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::py_fasta_validator=0.6" diff --git a/modules/nf-core/fastp/environment.yml b/modules/nf-core/fastp/environment.yml index 70389e6..26d4aca 100644 --- a/modules/nf-core/fastp/environment.yml +++ b/modules/nf-core/fastp/environment.yml @@ -1,7 +1,5 @@ -name: fastp channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fastp=0.23.4 diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml index 1787b38..691d4c7 100644 --- a/modules/nf-core/fastqc/environment.yml +++ b/modules/nf-core/fastqc/environment.yml @@ -1,7 +1,5 @@ -name: fastqc channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/gffcompare/environment.yml b/modules/nf-core/gffcompare/environment.yml index bcd633e..2b52417 100644 --- a/modules/nf-core/gffcompare/environment.yml +++ b/modules/nf-core/gffcompare/environment.yml @@ -1,7 +1,5 @@ -name: gffcompare channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gffcompare=0.12.6 diff --git a/modules/nf-core/gffcompare/meta.yml b/modules/nf-core/gffcompare/meta.yml index 674f08c..dd944f2 100644 --- a/modules/nf-core/gffcompare/meta.yml +++ b/modules/nf-core/gffcompare/meta.yml @@ -89,3 +89,4 @@ authors: - "@jemten" maintainers: - "@jemten" + - "@gallvp" diff --git a/modules/nf-core/gffcompare/tests/main.nf.test b/modules/nf-core/gffcompare/tests/main.nf.test new file mode 100644 index 0000000..258733a --- /dev/null +++ b/modules/nf-core/gffcompare/tests/main.nf.test @@ -0,0 +1,103 @@ + +nextflow_process { + + name "Test Process GFFCOMPARE" + script "../main.nf" + process "GFFCOMPARE" + + tag "modules" + tag "modules_nfcore" + tag "gffcompare" + + test("test-gffcompare") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) ], + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[2] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-gffcompare-combine") { + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) + ] + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[2] = [[id:'sarscov2'], []] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-gffcompare-combine-stub") { + options '-stub' + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) + ] + ] + input[1] = [ + [ id:'sarscov2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] + input[2] = [[id:'sarscov2'], []] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/gffcompare/tests/main.nf.test.snap b/modules/nf-core/gffcompare/tests/main.nf.test.snap new file mode 100644 index 0000000..9db3c0a --- /dev/null +++ b/modules/nf-core/gffcompare/tests/main.nf.test.snap @@ -0,0 +1,365 @@ +{ + "test-gffcompare": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.annotated.gtf:md5,9fdcea941cb003026e1ab04a45c3944c" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test" + }, + "test.genome.gff3.tmap:md5,8935511caaf122288167f8d908eb2632" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "test.genome.gff3.refmap:md5,60461ca3548615db12d31c53c5356ee5" + ] + ], + "4": [ + [ + { + "id": "test" + }, + "test.loci:md5,b637f88bbedda47aee859f7bc20c36ab" + ] + ], + "5": [ + [ + { + "id": "test" + }, + "test.stats:md5,a7c5a8cd8aa7188a2152e894f2355f10" + ] + ], + "6": [ + [ + { + "id": "test" + }, + "test.tracking:md5,344cd0bea36e5aab3a0824f2aaf7b824" + ] + ], + "7": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ], + "annotated_gtf": [ + [ + { + "id": "test" + }, + "test.annotated.gtf:md5,9fdcea941cb003026e1ab04a45c3944c" + ] + ], + "combined_gtf": [ + + ], + "loci": [ + [ + { + "id": "test" + }, + "test.loci:md5,b637f88bbedda47aee859f7bc20c36ab" + ] + ], + "refmap": [ + [ + { + "id": "test" + }, + "test.genome.gff3.refmap:md5,60461ca3548615db12d31c53c5356ee5" + ] + ], + "stats": [ + [ + { + "id": "test" + }, + "test.stats:md5,a7c5a8cd8aa7188a2152e894f2355f10" + ] + ], + "tmap": [ + [ + { + "id": "test" + }, + "test.genome.gff3.tmap:md5,8935511caaf122288167f8d908eb2632" + ] + ], + "tracking": [ + [ + { + "id": "test" + }, + "test.tracking:md5,344cd0bea36e5aab3a0824f2aaf7b824" + ] + ], + "versions": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T19:08:50.819004" + }, + "test-gffcompare-combine-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.annotated.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.combined.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "test.tmap:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "test.refmap:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test" + }, + "test.loci:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + [ + { + "id": "test" + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "test" + }, + "test.tracking:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ], + "annotated_gtf": [ + [ + { + "id": "test" + }, + "test.annotated.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "combined_gtf": [ + [ + { + "id": "test" + }, + "test.combined.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "loci": [ + [ + { + "id": "test" + }, + "test.loci:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "refmap": [ + [ + { + "id": "test" + }, + "test.refmap:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "stats": [ + [ + { + "id": "test" + }, + "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tmap": [ + [ + { + "id": "test" + }, + "test.tmap:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tracking": [ + [ + { + "id": "test" + }, + "test.tracking:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T19:10:25.943352" + }, + "test-gffcompare-combine": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test" + }, + "test.combined.gtf:md5,deebda20162eddb07b53d1da393a92a1" + ] + ], + "2": [ + [ + { + "id": "test" + }, + [ + "test.genome.gff3.tmap:md5,6f3866608c9d2b45d169dbc15a6372c4", + "test.genome.gtf.tmap:md5,6f3866608c9d2b45d169dbc15a6372c4" + ] + ] + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test" + }, + "test.loci:md5,2c020db4486b1997f68555825065c28d" + ] + ], + "5": [ + [ + { + "id": "test" + }, + "test.stats:md5,040cf90e0d649479173a5c846928cd67" + ] + ], + "6": [ + [ + { + "id": "test" + }, + "test.tracking:md5,55b10c257c1a07224cb5d995c799f782" + ] + ], + "7": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ], + "annotated_gtf": [ + + ], + "combined_gtf": [ + [ + { + "id": "test" + }, + "test.combined.gtf:md5,deebda20162eddb07b53d1da393a92a1" + ] + ], + "loci": [ + [ + { + "id": "test" + }, + "test.loci:md5,2c020db4486b1997f68555825065c28d" + ] + ], + "refmap": [ + + ], + "stats": [ + [ + { + "id": "test" + }, + "test.stats:md5,040cf90e0d649479173a5c846928cd67" + ] + ], + "tmap": [ + [ + { + "id": "test" + }, + [ + "test.genome.gff3.tmap:md5,6f3866608c9d2b45d169dbc15a6372c4", + "test.genome.gtf.tmap:md5,6f3866608c9d2b45d169dbc15a6372c4" + ] + ] + ], + "tracking": [ + [ + { + "id": "test" + }, + "test.tracking:md5,55b10c257c1a07224cb5d995c799f782" + ] + ], + "versions": [ + "versions.yml:md5,6f40a0e2547d9e3f4cf8e142ae5c17b6" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-29T19:10:21.420587" + } +} \ No newline at end of file diff --git a/modules/nf-core/gffread/environment.yml b/modules/nf-core/gffread/environment.yml index c6df58a..ee23984 100644 --- a/modules/nf-core/gffread/environment.yml +++ b/modules/nf-core/gffread/environment.yml @@ -1,7 +1,5 @@ -name: gffread channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::gffread=0.12.7 diff --git a/modules/nf-core/gt/gff3/environment.yml b/modules/nf-core/gt/gff3/environment.yml index 8289fb3..666eb47 100644 --- a/modules/nf-core/gt/gff3/environment.yml +++ b/modules/nf-core/gt/gff3/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "gt_gff3" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::genometools-genometools=1.6.5" diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml index dfc02a7..c779485 100644 --- a/modules/nf-core/gunzip/environment.yml +++ b/modules/nf-core/gunzip/environment.yml @@ -1,8 +1,6 @@ -name: gunzip channels: - conda-forge - bioconda - - defaults dependencies: - conda-forge::grep=3.11 - conda-forge::sed=4.8 diff --git a/modules/nf-core/liftoff/environment.yml b/modules/nf-core/liftoff/environment.yml index 7f3eadf..94c10a3 100644 --- a/modules/nf-core/liftoff/environment.yml +++ b/modules/nf-core/liftoff/environment.yml @@ -1,9 +1,6 @@ -name: liftoff - channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::liftoff=1.6.3 diff --git a/modules/nf-core/orthofinder/environment.yml b/modules/nf-core/orthofinder/environment.yml index f93b9bb..68c475f 100644 --- a/modules/nf-core/orthofinder/environment.yml +++ b/modules/nf-core/orthofinder/environment.yml @@ -1,9 +1,6 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "orthofinder" channels: - conda-forge - bioconda - - defaults dependencies: - - "bioconda::orthofinder=2.5.5" + - bioconda::diamond=2.1.9 + - bioconda::orthofinder=2.5.5 diff --git a/modules/nf-core/orthofinder/main.nf b/modules/nf-core/orthofinder/main.nf index 2971fc0..a47c4de 100644 --- a/modules/nf-core/orthofinder/main.nf +++ b/modules/nf-core/orthofinder/main.nf @@ -9,31 +9,40 @@ process ORTHOFINDER { input: tuple val(meta), path(fastas, stageAs: 'input/') + tuple val(meta2), path(prior_run) output: - tuple val(meta), path("$prefix") , emit: orthofinder - path "versions.yml" , emit: versions + tuple val(meta), path("$prefix") , emit: orthofinder + tuple val(meta), path("$prefix/WorkingDirectory") , emit: working + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def include_command = prior_run ? "-b $prior_run" : '' + """ mkdir temp_pickle orthofinder \\ - $args \\ -t $task.cpus \\ -a $task.cpus \\ -p temp_pickle \\ -f input \\ - -n $prefix + -n $prefix \\ + $include_command \\ + $args + + if [ -e input/OrthoFinder/Results_$prefix ]; then + mv input/OrthoFinder/Results_$prefix $prefix + fi - mv \\ - input/OrthoFinder/Results_$prefix \\ - $prefix + if [ -e ${prior_run}/OrthoFinder/Results_$prefix ]; then + mv ${prior_run}/OrthoFinder/Results_$prefix $prefix + fi cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -42,8 +51,10 @@ process ORTHOFINDER { """ stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def include_command = prior_run ? "-b $prior_run" : '' + """ mkdir -p $prefix/Comparative_Genomics_Statistics mkdir $prefix/Gene_Duplication_Events diff --git a/modules/nf-core/orthofinder/meta.yml b/modules/nf-core/orthofinder/meta.yml index 23cc532..8c7689b 100644 --- a/modules/nf-core/orthofinder/meta.yml +++ b/modules/nf-core/orthofinder/meta.yml @@ -29,6 +29,15 @@ input: type: list description: Input fasta files pattern: "*.{fa,faa,fasta,fas,pep}" + - meta2: + type: map + description: | + Groovy Map containing a name + e.g. `[ id:'folder1' ]` + - prior_run: + type: directory + description: | + A folder container containing a previous WorkingDirectory from Orthofinder. output: - meta: @@ -43,6 +52,9 @@ output: - orthofinder: type: directory description: Orthofinder output directory + - working: + type: directory + description: Orthofinder output WorkingDirectory (used for the orthofinder resume function) authors: - "@GallVp" diff --git a/modules/nf-core/orthofinder/tests/main.nf.test b/modules/nf-core/orthofinder/tests/main.nf.test index 2d64800..aa68d1d 100644 --- a/modules/nf-core/orthofinder/tests/main.nf.test +++ b/modules/nf-core/orthofinder/tests/main.nf.test @@ -9,6 +9,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "orthofinder" + tag "untar" test("sarscov2 - candidatus_portiera_aleyrodidarum - proteome") { @@ -28,6 +29,10 @@ nextflow_process { [ id:'test', single_end:false ], [ file_a, file_b ] ] + input[1] = [ + [], + [] + ] """ } } @@ -41,8 +46,6 @@ nextflow_process { all_files << file } - def all_file_names = all_files.collect { it.name }.sort(false) - def stable_file_names = [ 'Statistics_PerSpecies.tsv', 'SpeciesTree_Gene_Duplications_0.5_Support.txt', @@ -52,8 +55,66 @@ nextflow_process { def stable_files = all_files.findAll { it.name in stable_file_names } assert snapshot( - all_file_names, - stable_files, + stable_files.toSorted(), + process.out.versions[0] + ).match() + } + + } + + + test("sarscov2 - candidatus_portiera_aleyrodidarum - proteome - resume") { + + + setup { + run("UNTAR") { + script "../../untar/main.nf" + process { + """ + input[0] = [ [ id:'test1' ], // meta map + file(params.modules_testdata_base_path + 'delete_me/orthofinder/WorkingDirectory.tar.gz', checkIfExists: true) + ] + """ + } + } + } + + when { + process { + """ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) + .copyTo("${workDir}/sarscov2.fasta") + + def file_a = file("https://raw.githubusercontent.com/nf-core/test-datasets/proteinfold/testdata/sequences/H1065.fasta") + def file_c = UNTAR.out.untar + input[0] = [ + [ id:'test_2', single_end:false ], + [ file_a ] + ] + input[1] = UNTAR.out.untar + """ + } + } + + then { + assert process.success + + def all_files = [] + + file(process.out.orthofinder[0][1]).eachFileRecurse (FileType.FILES) { file -> + all_files << file + } + + def stable_file_names = [ + 'Statistics_PerSpecies.tsv', + 'OrthologuesStats_Totals.tsv', + 'Duplications_per_Species_Tree_Node.tsv' + ] + + def stable_files = all_files.findAll { it.name in stable_file_names } + + assert snapshot( + stable_files.toSorted(), process.out.versions[0] ).match() } @@ -80,6 +141,10 @@ nextflow_process { [ id:'test', single_end:false ], [ file_a, file_b ] ] + input[1] = [ + [], + [] + ] """ } } diff --git a/modules/nf-core/orthofinder/tests/main.nf.test.snap b/modules/nf-core/orthofinder/tests/main.nf.test.snap index 8b621c0..f2c7b91 100644 --- a/modules/nf-core/orthofinder/tests/main.nf.test.snap +++ b/modules/nf-core/orthofinder/tests/main.nf.test.snap @@ -1,310 +1,6 @@ { "sarscov2 - candidatus_portiera_aleyrodidarum - proteome": { "content": [ - [ - "Blast0_0.txt.gz", - "Blast0_1.txt.gz", - "Blast1_0.txt.gz", - "Blast1_1.txt.gz", - "Citation.txt", - "Duplications.tsv", - "Duplications_per_Orthogroup.tsv", - "Duplications_per_Species_Tree_Node.tsv", - "Log.txt", - "N0.tsv", - "OG0000000.fa", - "OG0000000_tree.txt", - "OG0000000_tree.txt", - "OG0000000_tree_id.txt", - "OG0000001.fa", - "OG0000001_tree.txt", - "OG0000001_tree.txt", - "OG0000001_tree_id.txt", - "OG0000002.fa", - "OG0000003.fa", - "OG0000004.fa", - "OG0000005.fa", - "OG0000006.fa", - "OG0000007.fa", - "OG0000008.fa", - "OG0000009.fa", - "OG0000010.fa", - "OG0000011.fa", - "OG0000012.fa", - "OG0000013.fa", - "OG0000014.fa", - "OG0000015.fa", - "OG0000016.fa", - "OG0000017.fa", - "OG0000018.fa", - "OG0000019.fa", - "OG0000020.fa", - "OG0000021.fa", - "OG0000022.fa", - "OG0000023.fa", - "OG0000024.fa", - "OG0000025.fa", - "OG0000026.fa", - "OG0000027.fa", - "OG0000028.fa", - "OG0000029.fa", - "OG0000030.fa", - "OG0000031.fa", - "OG0000032.fa", - "OG0000033.fa", - "OG0000034.fa", - "OG0000035.fa", - "OG0000036.fa", - "OG0000037.fa", - "OG0000038.fa", - "OG0000039.fa", - "OG0000040.fa", - "OG0000041.fa", - "OG0000042.fa", - "OG0000043.fa", - "OG0000044.fa", - "OG0000045.fa", - "OG0000046.fa", - "OG0000047.fa", - "OG0000048.fa", - "OG0000049.fa", - "OG0000050.fa", - "OG0000051.fa", - "OG0000052.fa", - "OG0000053.fa", - "OG0000054.fa", - "OG0000055.fa", - "OG0000056.fa", - "OG0000057.fa", - "OG0000058.fa", - "OG0000059.fa", - "OG0000060.fa", - "OG0000061.fa", - "OG0000062.fa", - "OG0000063.fa", - "OG0000064.fa", - "OG0000065.fa", - "OG0000066.fa", - "OG0000067.fa", - "OG0000068.fa", - "OG0000069.fa", - "OG0000070.fa", - "OG0000071.fa", - "OG0000072.fa", - "OG0000073.fa", - "OG0000074.fa", - "OG0000075.fa", - "OG0000076.fa", - "OG0000077.fa", - "OG0000078.fa", - "OG0000079.fa", - "OG0000080.fa", - "OG0000081.fa", - "OG0000082.fa", - "OG0000083.fa", - "OG0000084.fa", - "OG0000085.fa", - "OG0000086.fa", - "OG0000087.fa", - "OG0000088.fa", - "OG0000089.fa", - "OG0000090.fa", - "OG0000091.fa", - "OG0000092.fa", - "OG0000093.fa", - "OG0000094.fa", - "OG0000095.fa", - "OG0000096.fa", - "OG0000097.fa", - "OG0000098.fa", - "OG0000099.fa", - "OG0000100.fa", - "OG0000101.fa", - "OG0000102.fa", - "OG0000103.fa", - "OG0000104.fa", - "OG0000105.fa", - "OG0000106.fa", - "OG0000107.fa", - "OG0000108.fa", - "OG0000109.fa", - "OG0000110.fa", - "OG0000111.fa", - "OG0000112.fa", - "OG0000113.fa", - "OG0000114.fa", - "OG0000115.fa", - "OG0000116.fa", - "OG0000117.fa", - "OG0000118.fa", - "OG0000119.fa", - "OG0000120.fa", - "OG0000121.fa", - "OG0000122.fa", - "OG0000123.fa", - "OG0000124.fa", - "OG0000125.fa", - "OG0000126.fa", - "OG0000127.fa", - "OG0000128.fa", - "OG0000129.fa", - "OG0000130.fa", - "OG0000131.fa", - "OG0000132.fa", - "OG0000133.fa", - "OG0000134.fa", - "OG0000135.fa", - "OG0000136.fa", - "OG0000137.fa", - "OG0000138.fa", - "OG0000139.fa", - "OG0000140.fa", - "OG0000141.fa", - "OG0000142.fa", - "OG0000143.fa", - "OG0000144.fa", - "OG0000145.fa", - "OG0000146.fa", - "OG0000147.fa", - "OG0000148.fa", - "OG0000149.fa", - "OG0000150.fa", - "OG0000151.fa", - "OG0000152.fa", - "OG0000153.fa", - "OG0000154.fa", - "OG0000155.fa", - "OG0000156.fa", - "OG0000157.fa", - "OG0000158.fa", - "OG0000159.fa", - "OG0000160.fa", - "OG0000161.fa", - "OG0000162.fa", - "OG0000163.fa", - "OG0000164.fa", - "OG0000165.fa", - "OG0000166.fa", - "OG0000167.fa", - "OG0000168.fa", - "OG0000169.fa", - "OG0000170.fa", - "OG0000171.fa", - "OG0000172.fa", - "OG0000173.fa", - "OG0000174.fa", - "OG0000175.fa", - "OG0000176.fa", - "OG0000177.fa", - "OG0000178.fa", - "OG0000179.fa", - "OG0000180.fa", - "OG0000181.fa", - "OG0000182.fa", - "OG0000183.fa", - "OG0000184.fa", - "OG0000185.fa", - "OG0000186.fa", - "OG0000187.fa", - "OG0000188.fa", - "OG0000189.fa", - "OG0000190.fa", - "OG0000191.fa", - "OG0000192.fa", - "OG0000193.fa", - "OG0000194.fa", - "OG0000195.fa", - "OG0000196.fa", - "OG0000197.fa", - "OG0000198.fa", - "OG0000199.fa", - "OG0000200.fa", - "OG0000201.fa", - "OG0000202.fa", - "OG0000203.fa", - "OG0000204.fa", - "OG0000205.fa", - "OG0000206.fa", - "OG0000207.fa", - "OG0000208.fa", - "OG0000209.fa", - "OG0000210.fa", - "OG0000211.fa", - "OG0000212.fa", - "OG0000213.fa", - "OG0000214.fa", - "OG0000215.fa", - "OG0000216.fa", - "OG0000217.fa", - "OG0000218.fa", - "OG0000219.fa", - "OG0000220.fa", - "OG0000221.fa", - "OG0000222.fa", - "OG0000223.fa", - "OG0000224.fa", - "OG0000225.fa", - "OG0000226.fa", - "OG0000227.fa", - "OG0000228.fa", - "OG0000229.fa", - "OG0000230.fa", - "OG0000231.fa", - "OG0000232.fa", - "OG0000233.fa", - "OG0000234.fa", - "OG0000235.fa", - "OG0000236.fa", - "OG0000237.fa", - "OG0000238.fa", - "OG0000239.fa", - "OG0000240.fa", - "OG0000241.fa", - "OG0000242.fa", - "OG0000243.fa", - "OG0000244.fa", - "OG0000245.fa", - "OrthoFinder_graph.txt", - "Orthogroups.GeneCount.tsv", - "Orthogroups.tsv", - "Orthogroups.txt", - "Orthogroups_SingleCopyOrthologues.txt", - "Orthogroups_SpeciesOverlaps.tsv", - "Orthogroups_UnassignedGenes.tsv", - "OrthologuesStats_Totals.tsv", - "OrthologuesStats_many-to-many.tsv", - "OrthologuesStats_many-to-one.tsv", - "OrthologuesStats_one-to-many.tsv", - "OrthologuesStats_one-to-one.tsv", - "SequenceIDs.txt", - "SimpleTest.phy", - "SimpleTest.phy_fastme_stat.txt", - "SimpleTest.tre", - "Species0.fa", - "Species0.fa", - "Species1.fa", - "SpeciesIDs.txt", - "SpeciesTree_Gene_Duplications_0.5_Support.txt", - "SpeciesTree_rooted.txt", - "SpeciesTree_rooted_ids.txt", - "SpeciesTree_rooted_node_labels.txt", - "SpeciesTree_unrooted.txt", - "SpeciesTree_unrooted_ids.txt", - "Statistics_Overall.tsv", - "Statistics_PerSpecies.tsv", - "candidatus_portiera_aleyrodidarum.tsv", - "candidatus_portiera_aleyrodidarum.tsv", - "candidatus_portiera_aleyrodidarum__v__sarscov2.tsv", - "clusters_OrthoFinder_I1.5.txt", - "clusters_OrthoFinder_I1.5.txt_id_pairs.txt", - "diamondDBSpecies0.dmnd", - "diamondDBSpecies0.dmnd", - "diamondDBSpecies1.dmnd", - "sarscov2.tsv", - "sarscov2.tsv", - "sarscov2__v__candidatus_portiera_aleyrodidarum.tsv", - "test_search_results.txt.gz" - ], [ "Statistics_PerSpecies.tsv:md5,984b5011a34d54527fe17896bfa36a2d", "SpeciesTree_Gene_Duplications_0.5_Support.txt:md5,8b7a673e2e8b6d1aeb697f2bb88afa18", @@ -313,10 +9,10 @@ "versions.yml:md5,86b472c85626aac1840eec0769016f5c" ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-07T21:33:50.902329" + "timestamp": "2024-09-03T10:59:02.895708598" }, "sarscov2 - candidatus_portiera_aleyrodidarum - proteome - stub": { "content": [ @@ -372,6 +68,17 @@ ] ], "1": [ + [ + { + "id": "test", + "single_end": false + }, + [ + + ] + ] + ], + "2": [ "versions.yml:md5,86b472c85626aac1840eec0769016f5c" ], "orthofinder": [ @@ -426,13 +133,39 @@ ], "versions": [ "versions.yml:md5,86b472c85626aac1840eec0769016f5c" + ], + "working": [ + [ + { + "id": "test", + "single_end": false + }, + [ + + ] + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-03T11:07:31.319665056" + }, + "sarscov2 - candidatus_portiera_aleyrodidarum - proteome - resume": { + "content": [ + [ + "Duplications_per_Species_Tree_Node.tsv:md5,addc6f5ceec40bd82b00038d1872a27c", + "OrthologuesStats_Totals.tsv:md5,20d243abef226051a43cb37e922fc3eb", + "Statistics_PerSpecies.tsv:md5,83174c383b6c6828d1cc9b3be1679890" + ], + "versions.yml:md5,86b472c85626aac1840eec0769016f5c" + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" }, - "timestamp": "2024-06-07T16:00:56.530716" + "timestamp": "2024-09-03T11:04:10.916947006" } } \ No newline at end of file diff --git a/modules/nf-core/repeatmodeler/builddatabase/environment.yml b/modules/nf-core/repeatmodeler/builddatabase/environment.yml index ecc282e..5314307 100644 --- a/modules/nf-core/repeatmodeler/builddatabase/environment.yml +++ b/modules/nf-core/repeatmodeler/builddatabase/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "repeatmodeler_builddatabase" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::repeatmodeler=2.0.5" diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml b/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml index 2422071..5314307 100644 --- a/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml +++ b/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "repeatmodeler_repeatmodeler" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::repeatmodeler=2.0.5" diff --git a/modules/nf-core/samtools/cat/environment.yml b/modules/nf-core/samtools/cat/environment.yml index a368198..da2df5e 100644 --- a/modules/nf-core/samtools/cat/environment.yml +++ b/modules/nf-core/samtools/cat/environment.yml @@ -1,8 +1,6 @@ -name: samtools_cat channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::samtools=1.20 - bioconda::htslib=1.20 diff --git a/modules/nf-core/sortmerna/environment.yml b/modules/nf-core/sortmerna/environment.yml index f40f995..fab4408 100644 --- a/modules/nf-core/sortmerna/environment.yml +++ b/modules/nf-core/sortmerna/environment.yml @@ -1,7 +1,5 @@ -name: sortmerna channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::sortmerna=4.3.6 diff --git a/modules/nf-core/star/align/environment.yml b/modules/nf-core/star/align/environment.yml index 8bd58cf..e3d1c71 100644 --- a/modules/nf-core/star/align/environment.yml +++ b/modules/nf-core/star/align/environment.yml @@ -1,8 +1,6 @@ -name: star_align channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::star=2.7.10a - bioconda::samtools=1.18 diff --git a/modules/nf-core/star/genomegenerate/environment.yml b/modules/nf-core/star/genomegenerate/environment.yml index 791f255..38611df 100644 --- a/modules/nf-core/star/genomegenerate/environment.yml +++ b/modules/nf-core/star/genomegenerate/environment.yml @@ -1,8 +1,6 @@ -name: star_genomegenerate channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::samtools=1.18 - bioconda::htslib=1.18 diff --git a/modules/nf-core/tsebra/environment.yml b/modules/nf-core/tsebra/environment.yml index 657cd82..f189f6b 100644 --- a/modules/nf-core/tsebra/environment.yml +++ b/modules/nf-core/tsebra/environment.yml @@ -1,9 +1,7 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "tsebra" channels: - conda-forge - bioconda - - defaults dependencies: - "bioconda::tsebra=1.1.2.5" diff --git a/modules/nf-core/umitools/extract/environment.yml b/modules/nf-core/umitools/extract/environment.yml index aab452d..9f9e03c 100644 --- a/modules/nf-core/umitools/extract/environment.yml +++ b/modules/nf-core/umitools/extract/environment.yml @@ -1,7 +1,5 @@ -name: umitools_extract channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::umi_tools=1.1.5 diff --git a/subworkflows/local/fasta_orthofinder.nf b/subworkflows/local/fasta_orthofinder.nf index 715d78e..a39e26d 100644 --- a/subworkflows/local/fasta_orthofinder.nf +++ b/subworkflows/local/fasta_orthofinder.nf @@ -24,7 +24,10 @@ workflow FASTA_ORTHOFINDER { | collect | filter { it.size() > 1 } - ORTHOFINDER ( ch_orthofinder_peps.map { fastas -> [ [ id: 'genepal' ], fastas ] } ) + ORTHOFINDER( + ch_orthofinder_peps.map { fastas -> [ [ id: 'genepal' ], fastas ] }, + [ [], [] ] + ) ch_versions = ch_versions.mix(ORTHOFINDER.out.versions) diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index ac31f28..28e32b2 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -2,10 +2,6 @@ // Subworkflow with functionality that may be useful for any Nextflow pipeline // -import org.yaml.snakeyaml.Yaml -import groovy.json.JsonOutput -import nextflow.extension.FilesEx - /* ======================================================================================== SUBWORKFLOW DEFINITION @@ -58,7 +54,7 @@ workflow UTILS_NEXTFLOW_PIPELINE { // Generate version string // def getWorkflowVersion() { - String version_string = "" + def version_string = "" as String if (workflow.manifest.version) { def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' version_string += "${prefix_v}${workflow.manifest.version}" @@ -79,10 +75,10 @@ def dumpParametersToJSON(outdir) { def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') def filename = "params_${timestamp}.json" def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") - def jsonStr = JsonOutput.toJson(params) - temp_pf.text = JsonOutput.prettyPrint(jsonStr) + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) - FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") temp_pf.delete() } @@ -90,7 +86,7 @@ def dumpParametersToJSON(outdir) { // When running with -profile conda, warn if channels have not been set-up appropriately // def checkCondaChannels() { - Yaml parser = new Yaml() + def parser = new org.yaml.snakeyaml.Yaml() def channels = [] try { def config = parser.load("conda config --show channels".execute().text) @@ -102,14 +98,16 @@ def checkCondaChannels() { // Check that all channels are present // This channel list is ordered by required channel priority. - def required_channels_in_order = ['conda-forge', 'bioconda', 'defaults'] + def required_channels_in_order = ['conda-forge', 'bioconda'] def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean // Check that they are in the right order def channel_priority_violation = false - def n = required_channels_in_order.size() - for (int i = 0; i < n - 1; i++) { - channel_priority_violation |= !(channels.indexOf(required_channels_in_order[i]) < channels.indexOf(required_channels_in_order[i+1])) + + required_channels_in_order.eachWithIndex { channel, index -> + if (index < required_channels_in_order.size() - 1) { + channel_priority_violation |= !(channels.indexOf(channel) < channels.indexOf(required_channels_in_order[index+1])) + } } if (channels_missing | channel_priority_violation) { diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config index d0a926b..a09572e 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -3,7 +3,7 @@ manifest { author = """nf-core""" homePage = 'https://127.0.0.1' description = """Dummy pipeline""" - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 14558c3..cbd8495 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -2,9 +2,6 @@ // Subworkflow with utility functions specific to the nf-core pipeline template // -import org.yaml.snakeyaml.Yaml -import nextflow.extension.FilesEx - /* ======================================================================================== SUBWORKFLOW DEFINITION @@ -34,7 +31,7 @@ workflow UTILS_NFCORE_PIPELINE { // Warn if a -profile or Nextflow config has not been provided to run the pipeline // def checkConfigProvided() { - valid_config = true + def valid_config = true as Boolean if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + @@ -66,11 +63,13 @@ def checkProfileProvided(nextflow_cli_args) { // def workflowCitation() { def temp_doi_ref = "" - String[] manifest_doi = workflow.manifest.doi.tokenize(",") + def manifest_doi = workflow.manifest.doi.tokenize(",") // Using a loop to handle multiple DOIs // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers // Removing ` ` since the manifest.doi is a string and not a proper list - for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" + manifest_doi.each { doi_ref -> + temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" + } return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + temp_doi_ref + "\n" + @@ -84,7 +83,7 @@ def workflowCitation() { // Generate workflow version string // def getWorkflowVersion() { - String version_string = "" + def version_string = "" as String if (workflow.manifest.version) { def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' version_string += "${prefix_v}${workflow.manifest.version}" @@ -102,8 +101,8 @@ def getWorkflowVersion() { // Get software versions for pipeline // def processVersionsFromYAML(yaml_file) { - Yaml yaml = new Yaml() - versions = yaml.load(yaml_file).collectEntries { k, v -> [ k.tokenize(':')[-1], v ] } + def yaml = new org.yaml.snakeyaml.Yaml() + def versions = yaml.load(yaml_file).collectEntries { k, v -> [ k.tokenize(':')[-1], v ] } return yaml.dumpAsMap(versions).trim() } @@ -124,7 +123,7 @@ def workflowVersionToYAML() { def softwareVersionsToYAML(ch_versions) { return ch_versions .unique() - .map { processVersionsFromYAML(it) } + .map { version -> processVersionsFromYAML(version) } .unique() .mix(Channel.of(workflowVersionToYAML())) } @@ -134,19 +133,19 @@ def softwareVersionsToYAML(ch_versions) { // def paramsSummaryMultiqc(summary_params) { def summary_section = '' - for (group in summary_params.keySet()) { + summary_params.keySet().each { group -> def group_params = summary_params.get(group) // This gets the parameters of that particular group if (group_params) { summary_section += "
$group
\n" summary_section += "