Skip to content

Commit

Permalink
Merge pull request #380 from nf-core/update_local_modules
Browse files Browse the repository at this point in the history
Update local modules
  • Loading branch information
nschcolnicov authored Dec 20, 2024
2 parents 9a84f4b + e33cf9d commit ade0216
Show file tree
Hide file tree
Showing 21 changed files with 401 additions and 79 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#345](https://github.com/nf-core/differentialabundance/pull/345)] - Plot differentially expressed genes by gene biotype ([@atrigila](https://github.com/atrigila), review by [@grst](https://github.com/grst))
- [[#343](https://github.com/nf-core/differentialabundance/pull/343)] - Add pipeline-level nf-tests ([@atrigila](https://github.com/atrigila), review by [@pinin4fjords](https://github.com/pinin4fjords) and [@nschcolnicov](https://github.com/nschcolnicov))
- [[#286](https://github.com/nf-core/differentialabundance/pull/286)] - Integration of limma voom for rnaseq data ([@KamilMaliszArdigen](https://github.com/KamilMaliszArdigen), review by [@pinin4fjords](https://github.com/pinin4fjords))
- [[#380](https://github.com/nf-core/differentialabundance/pull/380)] - Replace local filter_diff_table module with nf-core one, and create nf-tests for tabular_to_gsea_chip. ([@nschcolnicov](https://github.com/nschcolnicov), review by [@pinin4fjords](https://github.com/pinin4fjords))

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ process {
].join(' ').trim() }
}

withName: FILTER_DIFFTABLE {
ext.prefix = { "${meta.id}" }
withName: CUSTOM_FILTERDIFFERENTIALTABLE {
ext.prefix = { "${input_file.toString().split("\\.").init().join(".")}" }
publishDir = [
[
path: { "${params.outdir}/tables/differential" },
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"custom/filterdifferentialtable": {
"branch": "master",
"git_sha": "833a65446ea117d092d4940f098236b6766e7aac",
"installed_by": ["modules"]
},
"custom/matrixfilter": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
Expand Down
52 changes: 0 additions & 52 deletions modules/local/filter_difftable.nf

This file was deleted.

6 changes: 6 additions & 0 deletions modules/local/tabulartogseachip/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
- bioconda

dependencies:
- conda-forge::gawk=5.1.0
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
process TABULAR_TO_GSEA_CHIP {

tag "$id"
label 'process_single'

conda "conda-forge::gawk=5.1.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gawk:5.1.0' :
'biocontainers/gawk:5.1.0' }"
conda "${moduleDir}/environment.yml"
container "community.wave.seqera.io/library/gawk:5.1.0--fa97c4ccf4cfbc4b"

input:
path tsv
Expand Down Expand Up @@ -41,4 +40,15 @@ process TABULAR_TO_GSEA_CHIP {
bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //'))
END_VERSIONS
"""

stub:
"""
touch stub.chip
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //'))
END_VERSIONS
"""

}
41 changes: 41 additions & 0 deletions modules/local/tabulartogseachip/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: tabular_to_gsea_chip
description: Convert tabular data into GSEA-compatible CHIP files.
keywords:
- GSEA
- CHIP
- Bioinformatics
tools:
- gawk:
description: |
GNU Awk (gawk) is a powerful programming language designed for text processing and typically used as a data extraction and reporting tool.
It is used here to manipulate tabular data and create the CHIP file format.
homepage: https://www.gnu.org/software/gawk/
documentation: https://www.gnu.org/software/gawk/manual/
licence: ["GPL-3.0-or-later"]
input:
- tsv:
type: file
description: |
Tab-separated values (TSV) file containing data to be converted into a CHIP file.
- - id:
type: string
description: |
Feature ID attribute in the abundance table as well as in the GTF file (e.g. the gene_id field).
- symbol:
type: string
description: |
Feature name attribute in the abundance table as well as in the GTF file (e.g. the gene symbol field).
output:
- chip:
type: file
description: Generated GSEA-compatible CHIP file.
pattern: "*.chip"
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@pinin4fjords" # Replace with actual author handles
maintainers:
- "@nschcolnicov"
49 changes: 49 additions & 0 deletions modules/local/tabulartogseachip/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
nextflow_process {

name "Test Process TABULAR_TO_GSEA_CHIP"
script "../main.nf"
process "TABULAR_TO_GSEA_CHIP"
tag "modules"
tag "modules_nfcore"
tag "tabular_to_gsea_chip"

test("test_tabular_to_gsea_chip") {

when {
process {
"""
input[0] = Channel.fromPath("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/Mus_musculus.anno.feature_metadata.tsv")
input[1] = ["gene_id", "gene_name"]
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out).match() },
)
}
}

test("test_tabular_to_gsea_chip - stub") {

options "-stub"

when {
process {
"""
input[0] = Channel.fromPath("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/differentialabundance/modules_testdata/Mus_musculus.anno.feature_metadata.tsv")
input[1] = ["gene_id", "gene_name"]
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(process.out).match() },
)
}
}
}
48 changes: 48 additions & 0 deletions modules/local/tabulartogseachip/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"test_tabular_to_gsea_chip - stub": {
"content": [
{
"0": [
"stub.chip:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [
"versions.yml:md5,a422b1a01e86be433a25d1776d497f5a"
],
"chip": [
"stub.chip:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,a422b1a01e86be433a25d1776d497f5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-06T21:03:06.781994447"
},
"test_tabular_to_gsea_chip": {
"content": [
{
"0": [
"Mus_musculus.anno.feature_metadata.chip:md5,5abf60bb982bb2ff5b8b3e37f14a21e4"
],
"1": [
"versions.yml:md5,a422b1a01e86be433a25d1776d497f5a"
],
"chip": [
"Mus_musculus.anno.feature_metadata.chip:md5,5abf60bb982bb2ff5b8b3e37f14a21e4"
],
"versions": [
"versions.yml:md5,a422b1a01e86be433a25d1776d497f5a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-06T21:02:58.608468636"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions modules/nf-core/custom/filterdifferentialtable/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ade0216

Please sign in to comment.