Skip to content

Commit a34559c

Browse files
authored
Merge pull request #496 from Kevin-Brockers/adapt_local_modules
Adapt local module to nf-core standard
2 parents 643351e + 9eb4de0 commit a34559c

30 files changed

Lines changed: 700 additions & 781 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- [[#484](https://github.com/nf-core/chipseq/issues/484)] - Bulk, updated of modules and subworkflows.
1919
- [[#489](https://github.com/nf-core/chipseq/issues/489)] - Replace deprecated `CUSTOM_GETCHROMSIZES` with `SAMTOOLS_FAIDX`.
2020
- [[PR #493](https://github.com/nf-core/chipseq/pull/493)] - Follow up to #487.
21+
- [[PR #493](https://github.com/nf-core/chipseq/pull/493)] - Follow up to #487.
22+
- [[#492](https://github.com/nf-core/chipseq/issues/492), [#417](https://github.com/nf-core/chipseq/issues/417)] - Refactor local modules to nf-core standard.
2123

2224
### Parameters
2325

@@ -55,10 +57,9 @@ the last release have been listed below for reference.
5557
| r-tidyverse | 1.3.0 | 2.0.0 |
5658
| bioconductor-complexheatmap | 2.6.2 | 2.26.1 |
5759
| star | 2.6.1d | 2.7.11b |
58-
59-
> **NB:** Dependency has been **updated** if both old and new version information is present.
60-
> **NB:** Dependency has been **added** if just the new version information is present.
61-
> **NB:** Dependency has been **removed** if version information isn't present.
60+
| python | 3.8.3 | 3.12.12 |
61+
| multiqc | 1.25.1 | 1.33 |
62+
| | | |
6263

6364
## [[2.1.0](https://github.com/nf-core/chipseq/releases/tag/2.1.0)] - 2024-10-07
6465

main.nf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ workflow NFCORE_CHIPSEQ {
6666
params.chromap_index,
6767
params.star_index,
6868
)
69-
ch_versions = ch_versions.mix(PREPARE_GENOME.out.versions)
7069

7170
//
7271
// WORKFLOW: Run nf-core/chipseq workflow
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- conda-forge::sed=4.7

modules/local/annotate_boolean_peaks/main.nf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ process ANNOTATE_BOOLEAN_PEAKS {
22
tag "$meta.id"
33
label 'process_low'
44

5-
conda "conda-forge::sed=4.7"
5+
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
77
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
88
'docker.io/library/ubuntu:20.04' }"
@@ -12,17 +12,12 @@ process ANNOTATE_BOOLEAN_PEAKS {
1212

1313
output:
1414
path '*.boolean.annotatePeaks.txt', emit: annotate_peaks_txt
15-
path "versions.yml" , emit: versions
15+
tuple val("${task.process}"), val('sed'), eval("sed --version 2>&1 | sed '1!d;s/^.*) //'"), topic: versions, emit: versions_sed
1616

1717
script:
1818
def prefix = task.ext.prefix ?: "${meta.id}"
1919
"""
2020
cut -f2- ${homer_peaks} | awk 'NR==1; NR > 1 {print \$0 | "sort -T '.' -k1,1 -k2,2n"}' | cut -f6- > tmp.txt
2121
paste $boolean_txt tmp.txt > ${prefix}.boolean.annotatePeaks.txt
22-
23-
cat <<-END_VERSIONS > versions.yml
24-
"${task.process}":
25-
sed: \$(echo \$(sed --version 2>&1) | sed 's/^.*GNU sed) //; s/ .*\$//')
26-
END_VERSIONS
2722
"""
2823
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- conda-forge::r-base
8+
- bioconda::bioconductor-deseq2
9+
- bioconda::bioconductor-biocparallel
10+
- bioconda::bioconductor-tximport
11+
- bioconda::bioconductor-complexheatmap
12+
- conda-forge::r-optparse
13+
- conda-forge::r-ggplot2
14+
- conda-forge::r-rcolorbrewer
15+
- conda-forge::r-pheatmap

modules/local/deseq2_qc/main.nf

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ process DESEQ2_QC {
44

55
// (Bio)conda packages have intentionally not been pinned to a specific version
66
// This was to avoid the pipeline failing due to package conflicts whilst creating the environment when using -profile conda
7-
conda "conda-forge::r-base bioconda::bioconductor-deseq2 bioconda::bioconductor-biocparallel bioconda::bioconductor-tximport bioconda::bioconductor-complexheatmap conda-forge::r-optparse conda-forge::r-ggplot2 conda-forge::r-rcolorbrewer conda-forge::r-pheatmap"
7+
conda "${moduleDir}/environment.yml"
88
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
99
'https://depot.galaxyproject.org/singularity/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' :
1010
'biocontainers/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' }"
@@ -24,7 +24,8 @@ process DESEQ2_QC {
2424
path "*sample.dists_mqc.tsv", optional:true, emit: dists_multiqc
2525
path "*.log" , optional:true, emit: log
2626
path "size_factors" , optional:true, emit: size_factors
27-
path "versions.yml" , emit: versions
27+
tuple val("${task.process}"), val('R'), eval('R --version | sed "1!d; s/.*version //; s/ .*//"'), topic: versions, emit: versions_r
28+
tuple val("${task.process}"), val('DESeq2'), eval('Rscript -e "library(DESeq2); cat(as.character(packageVersion(\'DESeq2\')))"'), topic: versions, emit: versions_deseq2
2829

2930
when:
3031
task.ext.when == null || task.ext.when
@@ -49,11 +50,5 @@ process DESEQ2_QC {
4950
sed 's/deseq2_clustering/deseq2_clustering_${task.index}/g' <$deseq2_clustering_header >tmp.txt
5051
sed -i -e 's/DESeq2 /${meta.id} DESeq2 /g' tmp.txt
5152
cat tmp.txt ${prefix}.sample.dists.txt > ${prefix}.sample.dists_mqc.tsv
52-
53-
cat <<-END_VERSIONS > versions.yml
54-
"${task.process}":
55-
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
56-
bioconductor-deseq2: \$(Rscript -e "library(DESeq2); cat(as.character(packageVersion('DESeq2')))")
57-
END_VERSIONS
5853
"""
5954
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- conda-forge::perl=5.26.2

modules/local/gtf2bed/main.nf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ process GTF2BED {
22
tag "$gtf"
33
label 'process_low'
44

5-
conda "conda-forge::perl=5.26.2"
5+
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
77
'https://depot.galaxyproject.org/singularity/perl:5.26.2':
88
'biocontainers/perl:5.26.2' }"
@@ -12,7 +12,7 @@ process GTF2BED {
1212

1313
output:
1414
path '*.bed' , emit: bed
15-
path "versions.yml", emit: versions
15+
tuple val("${task.process}"), val('perl'), eval("perl -V:version | sed \"s/version='//; s/';//\""), topic:versions, emit: versions_perl
1616

1717
when:
1818
task.ext.when == null || task.ext.when
@@ -22,10 +22,5 @@ process GTF2BED {
2222
gtf2bed \\
2323
$gtf \\
2424
> ${gtf.baseName}.bed
25-
26-
cat <<-END_VERSIONS > versions.yml
27-
"${task.process}":
28-
perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/')
29-
END_VERSIONS
3025
"""
3126
}

modules/local/igv/environment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- conda-forge::python=3.12.3

modules/local/igv/main.nf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
*/
44
process IGV {
55

6-
conda "conda-forge::python=3.8.3"
6+
conda "${moduleDir}/environment.yml"
77
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8-
'https://depot.galaxyproject.org/singularity/python:3.8.3':
9-
'biocontainers/python:3.8.3' }"
8+
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/62/622d8944750bc95bb56b4c3ed5c2b827e677c14073d48a5231e0f2bec0718add/data' :
9+
'community.wave.seqera.io/library/python:3.12.12--74abbf3898230efd' }"
1010

1111
input:
1212
val aligner_dir
@@ -21,7 +21,7 @@ process IGV {
2121
path "*files.txt" , emit: txt
2222
path "*.xml" , emit: xml
2323
path fasta , emit: fasta
24-
path "versions.yml", emit: versions
24+
tuple val("${task.process}"), val('python'), eval("python --version | sed 's/Python //'"), topic: versions, emit: versions_python
2525

2626
when:
2727
task.ext.when == null || task.ext.when
@@ -42,10 +42,5 @@ process IGV {
4242
4343
cat *.igv.txt > igv_files_orig.txt
4444
igv_files_to_session.py igv_session.xml igv_files_orig.txt replace_paths.txt ../../genome/${fasta.getName()} --path_prefix '../../'
45-
46-
cat <<-END_VERSIONS > versions.yml
47-
"${task.process}":
48-
python: \$(python --version | sed 's/Python //g')
49-
END_VERSIONS
5045
"""
5146
}

0 commit comments

Comments
 (0)