diff --git a/CHANGELOG.md b/CHANGELOG.md index db5326e..94f99d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Credits -### Changed +Special thanks to the following for their reviews and assistance: -### Fixed +- [Chris Hakkaart](https://github.com/christopher-hakkaart) +- [Marcel Ribeiro-Dantas](https://github.com/mribeirodantas) -### Dependencies +### Changed + +[#23](https://github.com/nf-core/demo/pull/23) - Update to latest `seqtk` and `fastqc` modules +[#21](https://github.com/nf-core/demo/pull/21) - Template update for nf-core/tools v3.1.0 ## [1.0.1](https://github.com/nf-core/demo/releases/tag/1.0.1) 2024-10-18 diff --git a/modules.json b/modules.json index f1822ca..11cfd65 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "fastqc": { "branch": "master", - "git_sha": "dc94b6ee04a05ddb9f7ae050712ff30a13149164", + "git_sha": "08108058ea36a63f141c25c4e75f9f872a5b2296", "installed_by": ["modules"] }, "multiqc": { @@ -17,7 +17,7 @@ }, "seqtk/trim": { "branch": "master", - "git_sha": "71c669747731cbc360dc220069c9f83015558c07", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] } } diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 752c3a1..033f415 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -1,5 +1,5 @@ process FASTQC { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" @@ -19,30 +19,30 @@ process FASTQC { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" // Make list of old name and new name pairs to use for renaming in the bash while loop def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } - def rename_to = old_new_pairs*.join(' ').join(' ') + def rename_to = old_new_pairs*.join(' ').join(' ') def renamed_files = old_new_pairs.collect{ _old_name, new_name -> new_name }.join(' ') // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label - def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') / task.cpus + def memory_in_mb = task.memory ? task.memory.toUnit('MB').toFloat() / task.cpus : null // FastQC memory value allowed range (100 - 10000) def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) """ - printf "%s %s\\n" $rename_to | while read old_name new_name; do + printf "%s %s\\n" ${rename_to} | while read old_name new_name; do [ -f "\${new_name}" ] || ln -s \$old_name \$new_name done fastqc \\ - $args \\ - --threads $task.cpus \\ - --memory $fastqc_memory \\ - $renamed_files + ${args} \\ + --threads ${task.cpus} \\ + --memory ${fastqc_memory} \\ + ${renamed_files} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastqc/tests/tags.yml b/modules/nf-core/fastqc/tests/tags.yml deleted file mode 100644 index 7834294..0000000 --- a/modules/nf-core/fastqc/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -fastqc: - - modules/nf-core/fastqc/** diff --git a/modules/nf-core/seqtk/trim/environment.yml b/modules/nf-core/seqtk/trim/environment.yml index 389a3a9..693aa5c 100644 --- a/modules/nf-core/seqtk/trim/environment.yml +++ b/modules/nf-core/seqtk/trim/environment.yml @@ -1,7 +1,5 @@ -name: seqtk_trim channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::seqtk=1.4 diff --git a/modules/nf-core/seqtk/trim/meta.yml b/modules/nf-core/seqtk/trim/meta.yml index 1177057..3a0198a 100644 --- a/modules/nf-core/seqtk/trim/meta.yml +++ b/modules/nf-core/seqtk/trim/meta.yml @@ -1,4 +1,3 @@ ---- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: seqtk_trim description: Trim low quality bases from FastQ files @@ -8,37 +7,39 @@ keywords: - seqtk tools: - "seqtk": - description: "Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format" + description: "Seqtk is a fast and lightweight tool for processing sequences in + the FASTA or FASTQ format" homepage: https://github.com/lh3/seqtk documentation: https://docs.csc.fi/apps/seqtk/ tool_dev_url: https://github.com/lh3/seqtk licence: ["MIT"] + identifier: biotools:seqtk input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: List of input FastQ files - pattern: "*.{fastq.gz}" - + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: List of input FastQ files + pattern: "*.{fastq.gz}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - reads: - type: file - description: Filtered FastQ files - pattern: "*.{fastq.gz}" - + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fastq.gz": + type: file + description: Filtered FastQ files + pattern: "*.{fastq.gz}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@laramiellindsey" diff --git a/modules/nf-core/seqtk/trim/tests/main.nf.test b/modules/nf-core/seqtk/trim/tests/main.nf.test index d99b6b2..be53186 100644 --- a/modules/nf-core/seqtk/trim/tests/main.nf.test +++ b/modules/nf-core/seqtk/trim/tests/main.nf.test @@ -19,7 +19,7 @@ nextflow_process { """ input[0] = [ [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] """ } @@ -45,8 +45,8 @@ test("Paired-end") { input[0] = [ [ id:'test', single_end:false ], // meta map [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ] """