From a1bf0e0d33c726d57dfa3ac1b5cde3010ba88aae Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Tue, 23 Jul 2024 18:17:21 +1200 Subject: [PATCH] Updated fasta_ltrretriever_lai --- .editorconfig | 14 +++ CHANGELOG.md | 8 +- modules.json | 84 ++++++++--------- .../{pfr => gallvp}/cat/cat/environment.yml | 0 modules/{pfr => gallvp}/cat/cat/main.nf | 1 - modules/{pfr => gallvp}/cat/cat/meta.yml | 0 .../cat/cat/tests/main.nf.test | 31 +++++-- .../cat/cat/tests/main.nf.test.snap | 74 ++++++++++----- .../cat/tests/nextflow_unzipped_zipped.config | 0 .../cat/tests/nextflow_zipped_unzipped.config | 0 .../{pfr => gallvp}/cat/cat/tests/tags.yml | 0 .../custom/restoregffids/environment.yml | 0 .../custom/restoregffids/main.nf | 0 .../custom/restoregffids/meta.yml | 0 .../templates/restore_gff_ids.py | 0 .../custom/restoregffids/tests/main.nf.test | 6 +- .../restoregffids/tests/main.nf.test.snap | 0 .../custom/shortenfastaids/environment.yml | 0 .../custom/shortenfastaids/main.nf | 0 .../custom/shortenfastaids/meta.yml | 0 .../templates/shorten_fasta_ids.py | 25 ++---- .../custom/shortenfastaids/tests/main.nf.test | 10 +-- .../shortenfastaids/tests/main.nf.test.snap | 0 .../{pfr => gallvp}/ltrfinder/environment.yml | 0 modules/{pfr => gallvp}/ltrfinder/main.nf | 0 modules/{pfr => gallvp}/ltrfinder/meta.yml | 0 .../ltrfinder/tests/main.nf.test | 36 ++++++-- .../ltrfinder/tests/main.nf.test.snap | 57 +++++++++--- .../ltrharvest/environment.yml | 0 modules/{pfr => gallvp}/ltrharvest/main.nf | 0 modules/{pfr => gallvp}/ltrharvest/meta.yml | 0 modules/gallvp/ltrharvest/tests/main.nf.test | 89 +++++++++++++++++++ .../ltrharvest/tests/main.nf.test.snap | 55 ++++++------ .../ltrretriever/lai/environment.yml | 0 .../{pfr => gallvp}/ltrretriever/lai/main.nf | 0 .../{pfr => gallvp}/ltrretriever/lai/meta.yml | 0 .../ltrretriever/lai/tests/main.nf.test | 10 +-- .../ltrretriever/lai/tests/main.nf.test.snap | 0 .../ltrretriever/lai/tests/nextflow.config | 0 .../ltrretriever/lai/tests/tags.yml | 0 .../ltrretriever/ltrretriever/environment.yml | 0 .../ltrretriever/ltrretriever/main.nf | 7 ++ .../ltrretriever/ltrretriever/meta.yml | 0 .../ltrretriever/tests/main.nf.test | 2 +- .../ltrretriever/tests/main.nf.test.snap | 0 .../ltrretriever/tests/nextflow.config | 0 .../pfr/custom/restoregffids/tests/tags.yml | 2 - .../pfr/custom/shortenfastaids/tests/tags.yml | 2 - modules/pfr/ltrfinder/tests/tags.yml | 2 - modules/pfr/ltrharvest/tests/main.nf.test | 60 ------------- modules/pfr/ltrharvest/tests/tags.yml | 2 - .../fasta_ltrretriever_lai/main.nf | 14 +-- .../fasta_ltrretriever_lai/meta.yml | 0 .../fasta_ltrretriever_lai/tests/main.nf.test | 41 +++++++-- .../tests/main.nf.test.snap | 76 ++++++++++++---- .../tests/nextflow.config | 0 .../pfr/fasta_ltrretriever_lai/tests/tags.yml | 2 - workflows/assemblyqc.nf | 4 +- 58 files changed, 453 insertions(+), 261 deletions(-) rename modules/{pfr => gallvp}/cat/cat/environment.yml (100%) rename modules/{pfr => gallvp}/cat/cat/main.nf (99%) rename modules/{pfr => gallvp}/cat/cat/meta.yml (100%) rename modules/{pfr => gallvp}/cat/cat/tests/main.nf.test (88%) rename modules/{pfr => gallvp}/cat/cat/tests/main.nf.test.snap (77%) rename modules/{pfr => gallvp}/cat/cat/tests/nextflow_unzipped_zipped.config (100%) rename modules/{pfr => gallvp}/cat/cat/tests/nextflow_zipped_unzipped.config (100%) rename modules/{pfr => gallvp}/cat/cat/tests/tags.yml (100%) rename modules/{pfr => gallvp}/custom/restoregffids/environment.yml (100%) rename modules/{pfr => gallvp}/custom/restoregffids/main.nf (100%) rename modules/{pfr => gallvp}/custom/restoregffids/meta.yml (100%) rename modules/{pfr => gallvp}/custom/restoregffids/templates/restore_gff_ids.py (100%) rename modules/{pfr => gallvp}/custom/restoregffids/tests/main.nf.test (85%) rename modules/{pfr => gallvp}/custom/restoregffids/tests/main.nf.test.snap (100%) rename modules/{pfr => gallvp}/custom/shortenfastaids/environment.yml (100%) rename modules/{pfr => gallvp}/custom/shortenfastaids/main.nf (100%) rename modules/{pfr => gallvp}/custom/shortenfastaids/meta.yml (100%) rename modules/{pfr => gallvp}/custom/shortenfastaids/templates/shorten_fasta_ids.py (88%) rename modules/{pfr => gallvp}/custom/shortenfastaids/tests/main.nf.test (81%) rename modules/{pfr => gallvp}/custom/shortenfastaids/tests/main.nf.test.snap (100%) rename modules/{pfr => gallvp}/ltrfinder/environment.yml (100%) rename modules/{pfr => gallvp}/ltrfinder/main.nf (100%) rename modules/{pfr => gallvp}/ltrfinder/meta.yml (100%) rename modules/{pfr => gallvp}/ltrfinder/tests/main.nf.test (54%) rename modules/{pfr => gallvp}/ltrfinder/tests/main.nf.test.snap (68%) rename modules/{pfr => gallvp}/ltrharvest/environment.yml (100%) rename modules/{pfr => gallvp}/ltrharvest/main.nf (100%) rename modules/{pfr => gallvp}/ltrharvest/meta.yml (100%) create mode 100644 modules/gallvp/ltrharvest/tests/main.nf.test rename modules/{pfr => gallvp}/ltrharvest/tests/main.nf.test.snap (69%) rename modules/{pfr => gallvp}/ltrretriever/lai/environment.yml (100%) rename modules/{pfr => gallvp}/ltrretriever/lai/main.nf (100%) rename modules/{pfr => gallvp}/ltrretriever/lai/meta.yml (100%) rename modules/{pfr => gallvp}/ltrretriever/lai/tests/main.nf.test (89%) rename modules/{pfr => gallvp}/ltrretriever/lai/tests/main.nf.test.snap (100%) rename modules/{pfr => gallvp}/ltrretriever/lai/tests/nextflow.config (100%) rename modules/{pfr => gallvp}/ltrretriever/lai/tests/tags.yml (100%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/environment.yml (100%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/main.nf (88%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/meta.yml (100%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/tests/main.nf.test (99%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/tests/main.nf.test.snap (100%) rename modules/{pfr => gallvp}/ltrretriever/ltrretriever/tests/nextflow.config (100%) delete mode 100644 modules/pfr/custom/restoregffids/tests/tags.yml delete mode 100644 modules/pfr/custom/shortenfastaids/tests/tags.yml delete mode 100644 modules/pfr/ltrfinder/tests/tags.yml delete mode 100644 modules/pfr/ltrharvest/tests/main.nf.test delete mode 100644 modules/pfr/ltrharvest/tests/tags.yml rename subworkflows/{pfr => gallvp}/fasta_ltrretriever_lai/main.nf (93%) rename subworkflows/{pfr => gallvp}/fasta_ltrretriever_lai/meta.yml (100%) rename subworkflows/{pfr => gallvp}/fasta_ltrretriever_lai/tests/main.nf.test (77%) rename subworkflows/{pfr => gallvp}/fasta_ltrretriever_lai/tests/main.nf.test.snap (73%) rename subworkflows/{pfr => gallvp}/fasta_ltrretriever_lai/tests/nextflow.config (100%) delete mode 100644 subworkflows/pfr/fasta_ltrretriever_lai/tests/tags.yml diff --git a/.editorconfig b/.editorconfig index 89dd3564..fc670f6e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -39,6 +39,20 @@ insert_final_newline = unset trim_trailing_whitespace = unset indent_style = unset +# These files are edited and tested upstream in gallvp/modules +[/modules/gallvp/**] +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_style = unset +[/subworkflows/gallvp/**] +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_style = unset + [/assets/email*] indent_size = unset diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eec1d13..3645d085 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 2. Added min. system requirements [#91](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/91) 3. Updated modules: `UNTAR`, `MERYL_COUNT`, `GUNZIP`, `MINIMAP2_ALIGN` 4. Added a test to verify the fix for the bug which resulted in a pipeline crash for assemblies without LTRs -5. Locally patched `FASTA_LTRRETRIEVER_LAI` sub-workflow to emit the `LTRRETRIEVER_LTRRETRIEVER` log as one of the outputs -6. Locally patched `LTRRETRIEVER_LTRRETRIEVER` module to not fail when `LTR_retriever` exits with an error -7. Updated NCBI FCS GX to 0.5.4 [#93](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/93) -8. Updated `SYRI` to 1.7.0 [#104](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/104) -9. Added a script to automatically check for updates on GitHub/GitLab and post issues +5. Updated NCBI FCS GX to 0.5.4 [#93](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/93) +6. Updated `SYRI` to 1.7.0 [#104](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/104) +7. Added a script to automatically check for updates on GitHub/GitLab and post issues ### `Fixed` diff --git a/modules.json b/modules.json index b6151a0c..8b4016dd 100644 --- a/modules.json +++ b/modules.json @@ -5,12 +5,56 @@ "https://github.com/GallVp/nxf-components.git": { "modules": { "gallvp": { + "cat/cat": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "custom/restoregffids": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "custom/shortenfastaids": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "ltrfinder": { + "branch": "main", + "git_sha": "db7fb043c5557cf06a49a1edbed16e282a7dffb2", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "ltrharvest": { + "branch": "main", + "git_sha": "db7fb043c5557cf06a49a1edbed16e282a7dffb2", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "ltrretriever/lai": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["fasta_ltrretriever_lai"] + }, + "ltrretriever/ltrretriever": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["fasta_ltrretriever_lai"] + }, "syri": { "branch": "main", "git_sha": "836bb223521eeaa08d65c1b7f4b82be1272a1964", "installed_by": ["modules"] } } + }, + "subworkflows": { + "gallvp": { + "fasta_ltrretriever_lai": { + "branch": "main", + "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", + "installed_by": ["subworkflows"] + } + } } }, "https://github.com/PlantandFoodResearch/nxf-modules.git": { @@ -36,26 +80,11 @@ "git_sha": "d158062346649b5d55bccef77f4bbd0468760aff", "installed_by": ["fastq_bwa_mem_samblaster"] }, - "cat/cat": { - "branch": "main", - "git_sha": "10b046eaac396f279c08e7e2bb067482ccd9c74e", - "installed_by": ["fasta_ltrretriever_lai"] - }, "custom/relabelfasta": { "branch": "main", "git_sha": "0421bdeb1d7a71dce12e0af7dc18aea26e548074", "installed_by": ["modules"] }, - "custom/restoregffids": { - "branch": "main", - "git_sha": "da7a50af5eaac9601e23f33e00bf24e61f9c27ab", - "installed_by": ["fasta_ltrretriever_lai"] - }, - "custom/shortenfastaids": { - "branch": "main", - "git_sha": "e9ec2e4c48ead3d760c8e13950c568c19ae86b8b", - "installed_by": ["fasta_ltrretriever_lai"] - }, "gffread": { "branch": "main", "git_sha": "c3ef9317fe867609f5927588fbf17e3c3ebf389c", @@ -76,26 +105,6 @@ "git_sha": "ffd39a616c84c814fdfb2a865e9fbbb06e5343d9", "installed_by": ["gff3_gt_gff3_gff3validator_stat", "modules"] }, - "ltrfinder": { - "branch": "main", - "git_sha": "10b046eaac396f279c08e7e2bb067482ccd9c74e", - "installed_by": ["fasta_ltrretriever_lai"] - }, - "ltrharvest": { - "branch": "main", - "git_sha": "10b046eaac396f279c08e7e2bb067482ccd9c74e", - "installed_by": ["fasta_ltrretriever_lai"] - }, - "ltrretriever/lai": { - "branch": "main", - "git_sha": "10b046eaac396f279c08e7e2bb067482ccd9c74e", - "installed_by": ["fasta_ltrretriever_lai"] - }, - "ltrretriever/ltrretriever": { - "branch": "main", - "git_sha": "10b046eaac396f279c08e7e2bb067482ccd9c74e", - "installed_by": ["fasta_ltrretriever_lai"] - }, "merqury/hapmers": { "branch": "main", "git_sha": "46b70684b6ae0ac60cae154c61796b293707db64", @@ -125,11 +134,6 @@ "git_sha": "0e4afaff4964485d2d93f1115c5254a99765b9c1", "installed_by": ["subworkflows"] }, - "fasta_ltrretriever_lai": { - "branch": "main", - "git_sha": "e9ec2e4c48ead3d760c8e13950c568c19ae86b8b", - "installed_by": ["subworkflows"] - }, "fastq_bwa_mem_samblaster": { "branch": "main", "git_sha": "d158062346649b5d55bccef77f4bbd0468760aff", diff --git a/modules/pfr/cat/cat/environment.yml b/modules/gallvp/cat/cat/environment.yml similarity index 100% rename from modules/pfr/cat/cat/environment.yml rename to modules/gallvp/cat/cat/environment.yml diff --git a/modules/pfr/cat/cat/main.nf b/modules/gallvp/cat/cat/main.nf similarity index 99% rename from modules/pfr/cat/cat/main.nf rename to modules/gallvp/cat/cat/main.nf index adbdbd7b..2862c64c 100644 --- a/modules/pfr/cat/cat/main.nf +++ b/modules/gallvp/cat/cat/main.nf @@ -76,4 +76,3 @@ def getFileSuffix(filename) { def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/ return match ? match[0][1] : filename.substring(filename.lastIndexOf('.')) } - diff --git a/modules/pfr/cat/cat/meta.yml b/modules/gallvp/cat/cat/meta.yml similarity index 100% rename from modules/pfr/cat/cat/meta.yml rename to modules/gallvp/cat/cat/meta.yml diff --git a/modules/pfr/cat/cat/tests/main.nf.test b/modules/gallvp/cat/cat/tests/main.nf.test similarity index 88% rename from modules/pfr/cat/cat/tests/main.nf.test rename to modules/gallvp/cat/cat/tests/main.nf.test index 0ac8549e..a0b9fd95 100644 --- a/modules/pfr/cat/cat/tests/main.nf.test +++ b/modules/gallvp/cat/cat/tests/main.nf.test @@ -4,7 +4,7 @@ nextflow_process { script "../main.nf" process "CAT_CAT" tag "modules" - tag "modules_nfcore" + tag "modules_gallvp" tag "cat" tag "cat/cat" @@ -29,7 +29,8 @@ nextflow_process { then { assertAll( { assert !process.success }, - { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") } + { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -83,8 +84,12 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_zipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_zipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } @@ -142,8 +147,12 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_unzipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } @@ -170,9 +179,13 @@ nextflow_process { def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_one_file_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_one_file_unzipped_zipped_size")} + { assert snapshot( + lines[0..5], + lines.size(), + process.out.versions + ).match() + } ) } } -} \ No newline at end of file +} diff --git a/modules/pfr/cat/cat/tests/main.nf.test.snap b/modules/gallvp/cat/cat/tests/main.nf.test.snap similarity index 77% rename from modules/pfr/cat/cat/tests/main.nf.test.snap rename to modules/gallvp/cat/cat/tests/main.nf.test.snap index 423571ba..b7623ee6 100644 --- a/modules/pfr/cat/cat/tests/main.nf.test.snap +++ b/modules/gallvp/cat/cat/tests/main.nf.test.snap @@ -1,10 +1,4 @@ { - "test_cat_unzipped_zipped_size": { - "content": [ - 375 - ], - "timestamp": "2023-10-16T14:33:08.049445686" - }, "test_cat_unzipped_unzipped": { "content": [ { @@ -34,6 +28,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, "timestamp": "2023-10-16T14:32:18.500464399" }, "test_cat_zipped_unzipped": { @@ -65,9 +63,13 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, "timestamp": "2023-10-16T14:32:49.642741302" }, - "test_cat_zipped_zipped_lines": { + "test_cat_zipped_zipped": { "content": [ [ "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab", @@ -76,11 +78,31 @@ "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1", "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1" + ], + 78, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:46.802978" + }, + "test_cat_name_conflict": { + "content": [ + [ + ] ], - "timestamp": "2023-10-16T14:32:33.629048645" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:29.45394" }, - "test_cat_unzipped_zipped_lines": { + "test_cat_one_file_unzipped_zipped": { "content": [ [ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", @@ -89,11 +111,19 @@ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" + ], + 374, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" ] ], - "timestamp": "2023-10-16T14:33:08.038830506" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:52:02.774016" }, - "test_cat_one_file_unzipped_zipped_lines": { + "test_cat_unzipped_zipped": { "content": [ [ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", @@ -102,20 +132,16 @@ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" + ], + 375, + [ + "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" ] ], - "timestamp": "2023-10-16T14:33:21.39642399" - }, - "test_cat_zipped_zipped_size": { - "content": [ - 78 - ], - "timestamp": "2023-10-16T14:32:33.641869244" - }, - "test_cat_one_file_unzipped_zipped_size": { - "content": [ - 374 - ], - "timestamp": "2023-10-16T14:33:21.4094373" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:51:57.581523" } } \ No newline at end of file diff --git a/modules/pfr/cat/cat/tests/nextflow_unzipped_zipped.config b/modules/gallvp/cat/cat/tests/nextflow_unzipped_zipped.config similarity index 100% rename from modules/pfr/cat/cat/tests/nextflow_unzipped_zipped.config rename to modules/gallvp/cat/cat/tests/nextflow_unzipped_zipped.config diff --git a/modules/pfr/cat/cat/tests/nextflow_zipped_unzipped.config b/modules/gallvp/cat/cat/tests/nextflow_zipped_unzipped.config similarity index 100% rename from modules/pfr/cat/cat/tests/nextflow_zipped_unzipped.config rename to modules/gallvp/cat/cat/tests/nextflow_zipped_unzipped.config diff --git a/modules/pfr/cat/cat/tests/tags.yml b/modules/gallvp/cat/cat/tests/tags.yml similarity index 100% rename from modules/pfr/cat/cat/tests/tags.yml rename to modules/gallvp/cat/cat/tests/tags.yml diff --git a/modules/pfr/custom/restoregffids/environment.yml b/modules/gallvp/custom/restoregffids/environment.yml similarity index 100% rename from modules/pfr/custom/restoregffids/environment.yml rename to modules/gallvp/custom/restoregffids/environment.yml diff --git a/modules/pfr/custom/restoregffids/main.nf b/modules/gallvp/custom/restoregffids/main.nf similarity index 100% rename from modules/pfr/custom/restoregffids/main.nf rename to modules/gallvp/custom/restoregffids/main.nf diff --git a/modules/pfr/custom/restoregffids/meta.yml b/modules/gallvp/custom/restoregffids/meta.yml similarity index 100% rename from modules/pfr/custom/restoregffids/meta.yml rename to modules/gallvp/custom/restoregffids/meta.yml diff --git a/modules/pfr/custom/restoregffids/templates/restore_gff_ids.py b/modules/gallvp/custom/restoregffids/templates/restore_gff_ids.py similarity index 100% rename from modules/pfr/custom/restoregffids/templates/restore_gff_ids.py rename to modules/gallvp/custom/restoregffids/templates/restore_gff_ids.py diff --git a/modules/pfr/custom/restoregffids/tests/main.nf.test b/modules/gallvp/custom/restoregffids/tests/main.nf.test similarity index 85% rename from modules/pfr/custom/restoregffids/tests/main.nf.test rename to modules/gallvp/custom/restoregffids/tests/main.nf.test index 20aa85c9..2c248c99 100644 --- a/modules/pfr/custom/restoregffids/tests/main.nf.test +++ b/modules/gallvp/custom/restoregffids/tests/main.nf.test @@ -5,7 +5,7 @@ nextflow_process { process "CUSTOM_RESTOREGFFIDS" tag "modules" - tag "modules_nfcore" + tag "modules_gallvp" tag "custom" tag "custom/restoregffids" @@ -15,7 +15,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) ] input[1] = Channel.of('Chr1\tMT192765.1').collectFile(name: 'id_map.tsv', newLine: true) """ @@ -43,7 +43,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) ] input[1] = Channel.of('Chr1\tMT192765.1').collectFile(name: 'id_map.tsv', newLine: true) """ diff --git a/modules/pfr/custom/restoregffids/tests/main.nf.test.snap b/modules/gallvp/custom/restoregffids/tests/main.nf.test.snap similarity index 100% rename from modules/pfr/custom/restoregffids/tests/main.nf.test.snap rename to modules/gallvp/custom/restoregffids/tests/main.nf.test.snap diff --git a/modules/pfr/custom/shortenfastaids/environment.yml b/modules/gallvp/custom/shortenfastaids/environment.yml similarity index 100% rename from modules/pfr/custom/shortenfastaids/environment.yml rename to modules/gallvp/custom/shortenfastaids/environment.yml diff --git a/modules/pfr/custom/shortenfastaids/main.nf b/modules/gallvp/custom/shortenfastaids/main.nf similarity index 100% rename from modules/pfr/custom/shortenfastaids/main.nf rename to modules/gallvp/custom/shortenfastaids/main.nf diff --git a/modules/pfr/custom/shortenfastaids/meta.yml b/modules/gallvp/custom/shortenfastaids/meta.yml similarity index 100% rename from modules/pfr/custom/shortenfastaids/meta.yml rename to modules/gallvp/custom/shortenfastaids/meta.yml diff --git a/modules/pfr/custom/shortenfastaids/templates/shorten_fasta_ids.py b/modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py similarity index 88% rename from modules/pfr/custom/shortenfastaids/templates/shorten_fasta_ids.py rename to modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py index 0ce43903..9d9c6e16 100755 --- a/modules/pfr/custom/shortenfastaids/templates/shorten_fasta_ids.py +++ b/modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py @@ -61,12 +61,7 @@ def do_id_need_to_change(id_and_description, silent=False): def do_ids_need_to_change(ids_and_descriptions, silent=False): - return any( - [ - do_id_need_to_change(id_and_description, silent) - for id_and_description in ids_and_descriptions - ] - ) + return any([do_id_need_to_change(id_and_description, silent) for id_and_description in ids_and_descriptions]) def extract_common_patterns(ids): @@ -76,9 +71,7 @@ def extract_common_patterns(ids): for pattern in set(patterns): pattern_counts[pattern] = pattern_counts.get(pattern, 0) + 1 - common_patterns = [ - pattern for pattern, count in pattern_counts.items() if count >= 2 - ] + common_patterns = [pattern for pattern, count in pattern_counts.items() if count >= 2] if len(common_patterns) < 1: return {} @@ -126,11 +119,7 @@ def shorten_id_by_pattern_replacement(patterns_dict, id): patterns_dict[pattern], shortened_id, ) - return ( - shortened_id - if shortened_id[len(shortened_id) - 1] != "_" - else shortened_id[0 : (len(shortened_id) - 1)] - ) + return shortened_id if shortened_id[len(shortened_id) - 1] != "_" else shortened_id[0 : (len(shortened_id) - 1)] def match_substrings(substrings, target_string): @@ -169,15 +158,11 @@ def fail_if_new_ids_not_valid(ids): f.write("IDs have acceptable length and character. No change required.") exit(0) - new_ids = shorten_ids( - input_ids_and_descriptions, extract_common_patterns(input_ids) - ) + new_ids = shorten_ids(input_ids_and_descriptions, extract_common_patterns(input_ids)) fail_if_new_ids_not_valid(new_ids) with open(f"{output_files_prefix}.short.ids.tsv", "w") as f: for input_id, new_id in zip(input_ids, new_ids): f.write(f"{input_id}\\t{new_id}\\n") - write_fasta_with_new_ids( - fasta_file_path, zip(input_ids, new_ids), output_files_prefix - ) + write_fasta_with_new_ids(fasta_file_path, zip(input_ids, new_ids), output_files_prefix) diff --git a/modules/pfr/custom/shortenfastaids/tests/main.nf.test b/modules/gallvp/custom/shortenfastaids/tests/main.nf.test similarity index 81% rename from modules/pfr/custom/shortenfastaids/tests/main.nf.test rename to modules/gallvp/custom/shortenfastaids/tests/main.nf.test index c87e8ebf..8eb2099c 100644 --- a/modules/pfr/custom/shortenfastaids/tests/main.nf.test +++ b/modules/gallvp/custom/shortenfastaids/tests/main.nf.test @@ -5,7 +5,7 @@ nextflow_process { process "CUSTOM_SHORTENFASTAIDS" tag "modules" - tag "modules_pfr" + tag "modules_gallvp" tag "custom" tag "custom/shortenfastaids" @@ -16,7 +16,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] """ } @@ -38,7 +38,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] """ } @@ -60,7 +60,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome2_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome2.fasta', checkIfExists: true) ] """ } @@ -105,7 +105,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] """ } diff --git a/modules/pfr/custom/shortenfastaids/tests/main.nf.test.snap b/modules/gallvp/custom/shortenfastaids/tests/main.nf.test.snap similarity index 100% rename from modules/pfr/custom/shortenfastaids/tests/main.nf.test.snap rename to modules/gallvp/custom/shortenfastaids/tests/main.nf.test.snap diff --git a/modules/pfr/ltrfinder/environment.yml b/modules/gallvp/ltrfinder/environment.yml similarity index 100% rename from modules/pfr/ltrfinder/environment.yml rename to modules/gallvp/ltrfinder/environment.yml diff --git a/modules/pfr/ltrfinder/main.nf b/modules/gallvp/ltrfinder/main.nf similarity index 100% rename from modules/pfr/ltrfinder/main.nf rename to modules/gallvp/ltrfinder/main.nf diff --git a/modules/pfr/ltrfinder/meta.yml b/modules/gallvp/ltrfinder/meta.yml similarity index 100% rename from modules/pfr/ltrfinder/meta.yml rename to modules/gallvp/ltrfinder/meta.yml diff --git a/modules/pfr/ltrfinder/tests/main.nf.test b/modules/gallvp/ltrfinder/tests/main.nf.test similarity index 54% rename from modules/pfr/ltrfinder/tests/main.nf.test rename to modules/gallvp/ltrfinder/tests/main.nf.test index 361e7324..c08af00a 100644 --- a/modules/pfr/ltrfinder/tests/main.nf.test +++ b/modules/gallvp/ltrfinder/tests/main.nf.test @@ -5,7 +5,7 @@ nextflow_process { process "LTRFINDER" tag "modules" - tag "modules_nfcore" + tag "modules_gallvp" tag "ltrfinder" tag "gunzip/main" @@ -19,7 +19,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] """ } @@ -37,8 +37,29 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot(path(process.out.versions[0]).text).match("versions") } + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2-genome_fasta-no_ltr") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } @@ -53,7 +74,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] """ } @@ -62,11 +83,10 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot(path(process.out.versions[0]).text).match("stub_versions") } + { assert snapshot(process.out).match() } ) } } -} \ No newline at end of file +} diff --git a/modules/pfr/ltrfinder/tests/main.nf.test.snap b/modules/gallvp/ltrfinder/tests/main.nf.test.snap similarity index 68% rename from modules/pfr/ltrfinder/tests/main.nf.test.snap rename to modules/gallvp/ltrfinder/tests/main.nf.test.snap index 54a2cee1..0f1790fc 100644 --- a/modules/pfr/ltrfinder/tests/main.nf.test.snap +++ b/modules/gallvp/ltrfinder/tests/main.nf.test.snap @@ -48,15 +48,54 @@ }, "timestamp": "2024-02-16T09:14:38.509965" }, - "versions": { + "sarscov2-genome_fasta-no_ltr": { "content": [ - "\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n" + { + "0": [ + [ + { + "id": "test" + }, + "test.scn:md5,2ce449dff751e59dbc292b6888491954" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.gff3:md5,bddeb04277af08b5850e64708e8af02a" + ] + ], + "2": [ + "versions.yml:md5,7b24225b810fa88cfb2a887de11be333" + ], + "gff": [ + [ + { + "id": "test" + }, + "test.gff3:md5,bddeb04277af08b5850e64708e8af02a" + ] + ], + "scn": [ + [ + { + "id": "test" + }, + "test.scn:md5,2ce449dff751e59dbc292b6888491954" + ] + ], + "versions": [ + "versions.yml:md5,7b24225b810fa88cfb2a887de11be333" + ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.2" }, - "timestamp": "2024-02-16T09:16:55.301422" + "timestamp": "2024-07-16T13:03:03.505263" }, "stub": { "content": [ @@ -106,15 +145,5 @@ "nextflow": "23.10.1" }, "timestamp": "2024-02-16T09:14:43.054758" - }, - "stub_versions": { - "content": [ - "\"LTRFINDER\":\n LTR_FINDER_parallel: v1.1\n ltr_finder: v1.07\n" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-16T09:16:59.800724" } } \ No newline at end of file diff --git a/modules/pfr/ltrharvest/environment.yml b/modules/gallvp/ltrharvest/environment.yml similarity index 100% rename from modules/pfr/ltrharvest/environment.yml rename to modules/gallvp/ltrharvest/environment.yml diff --git a/modules/pfr/ltrharvest/main.nf b/modules/gallvp/ltrharvest/main.nf similarity index 100% rename from modules/pfr/ltrharvest/main.nf rename to modules/gallvp/ltrharvest/main.nf diff --git a/modules/pfr/ltrharvest/meta.yml b/modules/gallvp/ltrharvest/meta.yml similarity index 100% rename from modules/pfr/ltrharvest/meta.yml rename to modules/gallvp/ltrharvest/meta.yml diff --git a/modules/gallvp/ltrharvest/tests/main.nf.test b/modules/gallvp/ltrharvest/tests/main.nf.test new file mode 100644 index 00000000..e53f347e --- /dev/null +++ b/modules/gallvp/ltrharvest/tests/main.nf.test @@ -0,0 +1,89 @@ +nextflow_process { + + name "Test Process LTRHARVEST" + script "../main.nf" + process "LTRHARVEST" + + tag "modules" + tag "modules_gallvp" + tag "ltrharvest" + + test("homo_sapiens - genome_21_fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.gff3, + process.out.versions + ).match() + }, + { assert path(process.out.scn[0][1]).text.contains("46510803 46520182 9380 46510803 46510940 138 46520042 46520182 141 86.52 0 chr21") }, + ) + } + + } + + test("sarscov2 - genome_fasta - no_ltr") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.gff3, + process.out.versions + ).match() + }, + { assert path(process.out.scn[0][1]).text.contains("predictions are reported in the following way") }, + ) + } + + } + + test("homo_sapiens - genome_fasta - stub") { + + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/pfr/ltrharvest/tests/main.nf.test.snap b/modules/gallvp/ltrharvest/tests/main.nf.test.snap similarity index 69% rename from modules/pfr/ltrharvest/tests/main.nf.test.snap rename to modules/gallvp/ltrharvest/tests/main.nf.test.snap index ad47c4ae..f3a8da8c 100644 --- a/modules/pfr/ltrharvest/tests/main.nf.test.snap +++ b/modules/gallvp/ltrharvest/tests/main.nf.test.snap @@ -1,5 +1,25 @@ { - "homo_sapiens-genome_fasta-stub": { + "sarscov2 - genome_fasta - no_ltr": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.gff3:md5,bddeb04277af08b5850e64708e8af02a" + ] + ], + [ + "versions.yml:md5,51e82185b713482d1d48b6f15abe7fcc" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-17T10:40:36.380052" + }, + "homo_sapiens - genome_fasta - stub": { "content": [ { "0": [ @@ -44,21 +64,11 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-22T14:44:30.682167" + "timestamp": "2024-07-17T10:40:40.967557" }, - "script_versions": { - "content": [ - "\"LTRHARVEST\":\n LTR_HARVEST_parallel: v1.1\n genometools: 1.6.5\n" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-22T14:44:26.672478" - }, - "gff3": { + "homo_sapiens - genome_21_fasta": { "content": [ [ [ @@ -67,22 +77,15 @@ }, "test.gff3:md5,da13c4ba22e44ef944ddec38aa72c468" ] + ], + [ + "versions.yml:md5,51e82185b713482d1d48b6f15abe7fcc" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-22T19:29:33.962761" - }, - "stub_versions": { - "content": [ - "\"LTRHARVEST\":\n LTR_HARVEST_parallel: v1.1\n genometools: 1.6.5\n" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-22T14:44:30.729166" + "timestamp": "2024-07-17T10:40:30.946" } } \ No newline at end of file diff --git a/modules/pfr/ltrretriever/lai/environment.yml b/modules/gallvp/ltrretriever/lai/environment.yml similarity index 100% rename from modules/pfr/ltrretriever/lai/environment.yml rename to modules/gallvp/ltrretriever/lai/environment.yml diff --git a/modules/pfr/ltrretriever/lai/main.nf b/modules/gallvp/ltrretriever/lai/main.nf similarity index 100% rename from modules/pfr/ltrretriever/lai/main.nf rename to modules/gallvp/ltrretriever/lai/main.nf diff --git a/modules/pfr/ltrretriever/lai/meta.yml b/modules/gallvp/ltrretriever/lai/meta.yml similarity index 100% rename from modules/pfr/ltrretriever/lai/meta.yml rename to modules/gallvp/ltrretriever/lai/meta.yml diff --git a/modules/pfr/ltrretriever/lai/tests/main.nf.test b/modules/gallvp/ltrretriever/lai/tests/main.nf.test similarity index 89% rename from modules/pfr/ltrretriever/lai/tests/main.nf.test rename to modules/gallvp/ltrretriever/lai/tests/main.nf.test index a617811b..e4289189 100644 --- a/modules/pfr/ltrretriever/lai/tests/main.nf.test +++ b/modules/gallvp/ltrretriever/lai/tests/main.nf.test @@ -6,7 +6,7 @@ nextflow_process { config "./nextflow.config" tag "modules" - tag "modules_nfcore" + tag "modules_gallvp" tag "gunzip" tag "ltrretriever" tag "ltrretriever/ltrretriever" @@ -26,7 +26,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] """ } @@ -114,7 +114,7 @@ nextflow_process { input[0] = [ [ id:'test' ], - file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] input[1] = pass_list.toPath() input[2] = out_file.toPath() @@ -145,7 +145,7 @@ nextflow_process { input[0] = [ [ id:'test' ], - file(params.test_data['actinidia_chinensis']['genome']['genome_21_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] input[1] = pass_list.toPath() input[2] = out_file.toPath() @@ -163,4 +163,4 @@ nextflow_process { } -} \ No newline at end of file +} diff --git a/modules/pfr/ltrretriever/lai/tests/main.nf.test.snap b/modules/gallvp/ltrretriever/lai/tests/main.nf.test.snap similarity index 100% rename from modules/pfr/ltrretriever/lai/tests/main.nf.test.snap rename to modules/gallvp/ltrretriever/lai/tests/main.nf.test.snap diff --git a/modules/pfr/ltrretriever/lai/tests/nextflow.config b/modules/gallvp/ltrretriever/lai/tests/nextflow.config similarity index 100% rename from modules/pfr/ltrretriever/lai/tests/nextflow.config rename to modules/gallvp/ltrretriever/lai/tests/nextflow.config diff --git a/modules/pfr/ltrretriever/lai/tests/tags.yml b/modules/gallvp/ltrretriever/lai/tests/tags.yml similarity index 100% rename from modules/pfr/ltrretriever/lai/tests/tags.yml rename to modules/gallvp/ltrretriever/lai/tests/tags.yml diff --git a/modules/pfr/ltrretriever/ltrretriever/environment.yml b/modules/gallvp/ltrretriever/ltrretriever/environment.yml similarity index 100% rename from modules/pfr/ltrretriever/ltrretriever/environment.yml rename to modules/gallvp/ltrretriever/ltrretriever/environment.yml diff --git a/modules/pfr/ltrretriever/ltrretriever/main.nf b/modules/gallvp/ltrretriever/ltrretriever/main.nf similarity index 88% rename from modules/pfr/ltrretriever/ltrretriever/main.nf rename to modules/gallvp/ltrretriever/ltrretriever/main.nf index dc7bb7e3..8e1e2beb 100644 --- a/modules/pfr/ltrretriever/ltrretriever/main.nf +++ b/modules/gallvp/ltrretriever/ltrretriever/main.nf @@ -34,6 +34,13 @@ process LTRRETRIEVER_LTRRETRIEVER { def inmgescan = mgescan ? "-inmgescan $mgescan" : '' def non_tgca_file = non_tgca ? "-nonTGCA $non_tgca" : '' def writable_genome = "${genome.baseName}.writable.${genome.extension}" + // writable_genome: + // This is needed to avoid LTR_retriever:2.9.9 failure when the input `genome` is + // readonly. LTR_retriever triggers a 'die' if the genome is readonly. + // See: https://github.com/oushujun/LTR_retriever/blob/4039eb7778fd9cbc60021e99a8693285e0fa2daf/LTR_retriever#L312 + // + // This copy with permissions logic can be removed once https://github.com/oushujun/LTR_retriever/issues/176 + // has been resolved. """ cp \\ $genome \\ diff --git a/modules/pfr/ltrretriever/ltrretriever/meta.yml b/modules/gallvp/ltrretriever/ltrretriever/meta.yml similarity index 100% rename from modules/pfr/ltrretriever/ltrretriever/meta.yml rename to modules/gallvp/ltrretriever/ltrretriever/meta.yml diff --git a/modules/pfr/ltrretriever/ltrretriever/tests/main.nf.test b/modules/gallvp/ltrretriever/ltrretriever/tests/main.nf.test similarity index 99% rename from modules/pfr/ltrretriever/ltrretriever/tests/main.nf.test rename to modules/gallvp/ltrretriever/ltrretriever/tests/main.nf.test index 5f67ff16..91b1a104 100644 --- a/modules/pfr/ltrretriever/ltrretriever/tests/main.nf.test +++ b/modules/gallvp/ltrretriever/ltrretriever/tests/main.nf.test @@ -6,7 +6,7 @@ nextflow_process { config "./nextflow.config" tag "modules" - tag "modules_nfcore" + tag "modules_gallvp" tag "ltrretriever" tag "ltrretriever/ltrretriever" tag "gunzip/main" diff --git a/modules/pfr/ltrretriever/ltrretriever/tests/main.nf.test.snap b/modules/gallvp/ltrretriever/ltrretriever/tests/main.nf.test.snap similarity index 100% rename from modules/pfr/ltrretriever/ltrretriever/tests/main.nf.test.snap rename to modules/gallvp/ltrretriever/ltrretriever/tests/main.nf.test.snap diff --git a/modules/pfr/ltrretriever/ltrretriever/tests/nextflow.config b/modules/gallvp/ltrretriever/ltrretriever/tests/nextflow.config similarity index 100% rename from modules/pfr/ltrretriever/ltrretriever/tests/nextflow.config rename to modules/gallvp/ltrretriever/ltrretriever/tests/nextflow.config diff --git a/modules/pfr/custom/restoregffids/tests/tags.yml b/modules/pfr/custom/restoregffids/tests/tags.yml deleted file mode 100644 index 1d4b9a83..00000000 --- a/modules/pfr/custom/restoregffids/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/restoregffids: - - "modules/pfr/custom/restoregffids/**" diff --git a/modules/pfr/custom/shortenfastaids/tests/tags.yml b/modules/pfr/custom/shortenfastaids/tests/tags.yml deleted file mode 100644 index 4715b64c..00000000 --- a/modules/pfr/custom/shortenfastaids/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/shortenfastaids: - - "modules/pfr/custom/shortenfastaids/**" diff --git a/modules/pfr/ltrfinder/tests/tags.yml b/modules/pfr/ltrfinder/tests/tags.yml deleted file mode 100644 index 006ded2c..00000000 --- a/modules/pfr/ltrfinder/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ltrfinder: - - "modules/nf-core/ltrfinder/**" diff --git a/modules/pfr/ltrharvest/tests/main.nf.test b/modules/pfr/ltrharvest/tests/main.nf.test deleted file mode 100644 index 76b49476..00000000 --- a/modules/pfr/ltrharvest/tests/main.nf.test +++ /dev/null @@ -1,60 +0,0 @@ -nextflow_process { - - name "Test Process LTRHARVEST" - script "../main.nf" - process "LTRHARVEST" - - tag "modules" - tag "modules_nfcore" - tag "ltrharvest" - - test("homo_sapiens-genome_21_fasta") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.gff3).match("gff3") }, - { assert path(process.out.scn[0][1]).text.contains("46510803 46520182 9380 46510803 46510940 138 46520042 46520182 141 86.52 0 chr21") }, - { assert snapshot(path(process.out.versions[0]).text).match("script_versions") } - ) - } - - } - - test("homo_sapiens-genome_fasta-stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot(path(process.out.versions[0]).text).match("stub_versions") } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/pfr/ltrharvest/tests/tags.yml b/modules/pfr/ltrharvest/tests/tags.yml deleted file mode 100644 index 92de225e..00000000 --- a/modules/pfr/ltrharvest/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ltrharvest: - - "modules/nf-core/ltrharvest/**" diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/main.nf b/subworkflows/gallvp/fasta_ltrretriever_lai/main.nf similarity index 93% rename from subworkflows/pfr/fasta_ltrretriever_lai/main.nf rename to subworkflows/gallvp/fasta_ltrretriever_lai/main.nf index b1d123cb..820f9763 100644 --- a/subworkflows/pfr/fasta_ltrretriever_lai/main.nf +++ b/subworkflows/gallvp/fasta_ltrretriever_lai/main.nf @@ -1,10 +1,10 @@ -include { CUSTOM_SHORTENFASTAIDS } from '../../../modules/pfr/custom/shortenfastaids/main' -include { LTRHARVEST } from '../../../modules/pfr/ltrharvest/main' -include { LTRFINDER } from '../../../modules/pfr/ltrfinder/main' -include { LTRRETRIEVER_LTRRETRIEVER } from '../../../modules/pfr/ltrretriever/ltrretriever/main' -include { CAT_CAT } from '../../../modules/pfr/cat/cat/main' -include { LTRRETRIEVER_LAI } from '../../../modules/pfr/ltrretriever/lai/main' -include { CUSTOM_RESTOREGFFIDS } from '../../../modules/pfr/custom/restoregffids/main' +include { CUSTOM_SHORTENFASTAIDS } from '../../../modules/gallvp/custom/shortenfastaids/main' +include { LTRHARVEST } from '../../../modules/gallvp/ltrharvest/main' +include { LTRFINDER } from '../../../modules/gallvp/ltrfinder/main' +include { LTRRETRIEVER_LTRRETRIEVER } from '../../../modules/gallvp/ltrretriever/ltrretriever/main' +include { CAT_CAT } from '../../../modules/gallvp/cat/cat/main' +include { LTRRETRIEVER_LAI } from '../../../modules/gallvp/ltrretriever/lai/main' +include { CUSTOM_RESTOREGFFIDS } from '../../../modules/gallvp/custom/restoregffids/main' workflow FASTA_LTRRETRIEVER_LAI { diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/meta.yml b/subworkflows/gallvp/fasta_ltrretriever_lai/meta.yml similarity index 100% rename from subworkflows/pfr/fasta_ltrretriever_lai/meta.yml rename to subworkflows/gallvp/fasta_ltrretriever_lai/meta.yml diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test b/subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test similarity index 77% rename from subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test rename to subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test index a7fc65eb..644e420f 100644 --- a/subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test +++ b/subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test @@ -6,7 +6,7 @@ nextflow_workflow { config "./nextflow.config" tag "subworkflows" - tag "subworkflows_pfr" + tag "subworkflows_gallvp" tag "subworkflows/fasta_ltrretriever_lai" tag "fasta_ltrretriever_lai" tag "modules/nf-core/gunzip" @@ -26,7 +26,7 @@ nextflow_workflow { """ input[0] = [ [ id:'test' ], - file(params.test_data['actinidia_chinensis']['genome']['genome_1_fasta_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) ] """ } @@ -53,7 +53,7 @@ nextflow_workflow { { assert file(workflow.out.lai_log[0][1]).text.contains('Done!') }, { assert Math.abs(Float.parseFloat(path(workflow.out.lai_out[0][1]).text.split("\n")[1].split("\t")[6]) - 31.29) <= 1.0 }, { assert file(workflow.out.ltrlib[0][1]).text.contains('#LTR/Copia') }, - { assert snapshot(workflow.out.versions).match("fasta_gz_versions") } + { assert snapshot(workflow.out.versions).match() } ) } } @@ -89,7 +89,7 @@ nextflow_workflow { { assert file(workflow.out.lai_log[0][1]).text.contains('Done!') }, { assert Math.abs(Float.parseFloat(path(workflow.out.lai_out[0][1]).text.split("\n")[1].split("\t")[6]) - 31.29) <= 1.0 }, { assert file(workflow.out.ltrlib[0][1]).text.contains('#LTR/Copia') }, - { assert snapshot(workflow.out.versions).match("with_mono_versions") } + { assert snapshot(workflow.out.versions).match() } ) } } @@ -122,7 +122,7 @@ nextflow_workflow { { assert file(workflow.out.lai_log[0][1]).text.contains('Done!') }, { assert Math.abs(Float.parseFloat(path(workflow.out.lai_out[0][1]).text.split("\n")[1].split("\t")[6]) - 31.29) <= 1.0 }, { assert file(workflow.out.ltrlib[0][1]).text.contains('#LTR/Copia') }, - { assert snapshot(workflow.out.versions).match("with_empty_mono_versions") } + { assert snapshot(workflow.out.versions).match() } ) } } @@ -151,4 +151,35 @@ nextflow_workflow { ) } } + + test("homo_sapiens - sarscov2 - noltr") { + + when { + workflow { + """ + input[0] = Channel.of([ + [ id: 'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[1] = [] + input[2] = false + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { path(workflow.out.ltrretriever_log[0][1]).text.contains('ERROR: No candidate is found in the file(s) you specified.') }, + { assert snapshot( + workflow.out.annotation_gff, + workflow.out.lai_log, + workflow.out.lai_out, + workflow.out.ltrlib, + workflow.out.versions + ).match() + } + ) + } + } } \ No newline at end of file diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test.snap b/subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test.snap similarity index 73% rename from subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test.snap rename to subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test.snap index e827219f..d0cf8e44 100644 --- a/subworkflows/pfr/fasta_ltrretriever_lai/tests/main.nf.test.snap +++ b/subworkflows/gallvp/fasta_ltrretriever_lai/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "fasta_gz_versions": { + "actinidia_chinensis-genome_1_fasta_gz-with_empty_mono": { "content": [ [ "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", @@ -7,16 +7,45 @@ "versions.yml:md5,5d86cda262f5c21e43738433a2781ebc", "versions.yml:md5,608d746d45680f025562c4be455db461", "versions.yml:md5,8468404805dddec679524e75b4fa51e8", + "versions.yml:md5,9b2d5d76add82441b1e950d333e31307", + "versions.yml:md5,fb42c6cc5c28b6f9d3384171c7b6b143" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-23T10:24:39.012122" + }, + "homo_sapiens - sarscov2 - noltr": { + "content": [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", + "versions.yml:md5,52a98b45c3cf73f9314dbe9b34eca9d8", + "versions.yml:md5,608d746d45680f025562c4be455db461", + "versions.yml:md5,8468404805dddec679524e75b4fa51e8", "versions.yml:md5,fb42c6cc5c28b6f9d3384171c7b6b143" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-06-02T20:28:52.168753" + "timestamp": "2024-07-23T10:25:08.444634" }, - "with_empty_mono_versions": { + "actinidia_chinensis-genome_1_fasta_gz": { "content": [ [ "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", @@ -24,17 +53,16 @@ "versions.yml:md5,5d86cda262f5c21e43738433a2781ebc", "versions.yml:md5,608d746d45680f025562c4be455db461", "versions.yml:md5,8468404805dddec679524e75b4fa51e8", - "versions.yml:md5,9b2d5d76add82441b1e950d333e31307", "versions.yml:md5,fb42c6cc5c28b6f9d3384171c7b6b143" ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-06-02T20:35:11.879068" + "timestamp": "2024-07-23T10:18:00.012075" }, - "with_mono_versions": { + "actinidia_chinensis-genome_1_fasta_gz-with_mono": { "content": [ [ "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", @@ -48,9 +76,9 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.04.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-06-02T20:30:58.393054" + "timestamp": "2024-07-23T10:21:18.682603" }, "empty_fasta_stub": { "content": [ @@ -60,7 +88,7 @@ { "id": "test" }, - "test.LTRlib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -68,7 +96,7 @@ { "id": "test" }, - "test.out.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.LTRlib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ @@ -76,7 +104,7 @@ { "id": "test" }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.out.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "3": [ @@ -84,10 +112,18 @@ { "id": "test" }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ + [ + { + "id": "test" + }, + "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", "versions.yml:md5,52a98b45c3cf73f9314dbe9b34eca9d8", "versions.yml:md5,5d86cda262f5c21e43738433a2781ebc", @@ -127,6 +163,14 @@ "test.LTRlib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "ltrretriever_log": [ + [ + { + "id": "test" + }, + "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], "versions": [ "versions.yml:md5,05a74dacbcd6c5906faeca3206f6563f", "versions.yml:md5,52a98b45c3cf73f9314dbe9b34eca9d8", @@ -139,8 +183,8 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nextflow": "24.04.3" }, - "timestamp": "2024-06-04T13:50:48.75158" + "timestamp": "2024-07-23T10:24:51.320182" } } \ No newline at end of file diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/tests/nextflow.config b/subworkflows/gallvp/fasta_ltrretriever_lai/tests/nextflow.config similarity index 100% rename from subworkflows/pfr/fasta_ltrretriever_lai/tests/nextflow.config rename to subworkflows/gallvp/fasta_ltrretriever_lai/tests/nextflow.config diff --git a/subworkflows/pfr/fasta_ltrretriever_lai/tests/tags.yml b/subworkflows/pfr/fasta_ltrretriever_lai/tests/tags.yml deleted file mode 100644 index 9c15c67e..00000000 --- a/subworkflows/pfr/fasta_ltrretriever_lai/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/fasta_ltrretriever_lai: - - subworkflows/pfr/fasta_ltrretriever_lai/** diff --git a/workflows/assemblyqc.nf b/workflows/assemblyqc.nf index 2b8bc12e..a102d5b8 100644 --- a/workflows/assemblyqc.nf +++ b/workflows/assemblyqc.nf @@ -16,10 +16,10 @@ include { FCS_FCSADAPTOR } from '../modules/nf-core/fcs/fcsad include { NCBI_FCS_GX } from '../subworkflows/local/ncbi_fcs_gx' include { ASSEMBLATHON_STATS } from '../modules/local/assemblathon_stats' include { FASTA_GXF_BUSCO_PLOT } from '../subworkflows/pfr/fasta_gxf_busco_plot/main' -include { FASTA_LTRRETRIEVER_LAI } from '../subworkflows/pfr/fasta_ltrretriever_lai/main' +include { FASTA_LTRRETRIEVER_LAI } from '../subworkflows/gallvp/fasta_ltrretriever_lai/main' include { FASTA_KRAKEN2 } from '../subworkflows/local/fasta_kraken2' include { FQ2HIC } from '../subworkflows/local/fq2hic' -include { CAT_CAT as TAG_ASSEMBLY } from '../modules/pfr/cat/cat/main' +include { CAT_CAT as TAG_ASSEMBLY } from '../modules/gallvp/cat/cat/main' include { FASTA_SYNTENY } from '../subworkflows/local/fasta_synteny' include { MERYL_COUNT } from '../modules/nf-core/meryl/count/main' include { MERYL_UNIONSUM } from '../modules/nf-core/meryl/unionsum/main'