-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New module: GRIMER #11663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
New module: GRIMER #11663
Changes from all commits
551a888
0636a0e
ed269c7
b5abc35
fe47701
3644a8e
a3fb04c
984ab07
a651add
8b3d7c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::grimer=1.1.0" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| process GRIMER { | ||
| tag "$meta.id" | ||
| label 'process_single' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/grimer:1.1.0--pyhdfd78af_0': | ||
| 'quay.io/biocontainers/grimer:1.1.0--pyhdfd78af_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(input_table) | ||
| path sample_metadata | ||
| path config | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.html"), emit: report | ||
| tuple val("${task.process}"), val('grimer'), eval('grimer --version 2>&1 | tail -1'), emit: versions_grimer, topic: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def m_arg = sample_metadata ? "-m ${sample_metadata}" : '' | ||
| def c_arg = config ? "-c ${config}" : '' | ||
| """ | ||
| grimer \\ | ||
| -i ${input_table} \\ | ||
| ${m_arg} \\ | ||
| ${c_arg} \\ | ||
| -o ${prefix}.html \\ | ||
| ${args} | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch ${prefix}.html | ||
| """ | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: grimer | ||
| description: | | ||
| Generates an interactive HTML dashboard integrating taxonomy, | ||
| annotation, and metadata to detect contamination in metagenomic | ||
| and amplicon sequencing datasets. GRIMER is independent of | ||
| quantification methods and directly analyses contingency tables. | ||
| keywords: | ||
| - metagenomics | ||
| - contamination | ||
| - visualisation | ||
| - taxonomy | ||
| - viromics | ||
| - microbiome | ||
| - dashboard | ||
| tools: | ||
| - grimer: | ||
| description: | | ||
| GRIMER performs automated contamination analysis and generates | ||
| portable interactive dashboards from contingency tables, | ||
| integrating taxonomy, annotation and metadata. | ||
| homepage: https://github.com/pirovc/grimer | ||
| documentation: https://pirovc.github.io/grimer/ | ||
| tool_dev_url: https://github.com/pirovc/grimer | ||
| doi: "10.1101/2021.06.22.449360" | ||
| licence: | ||
| - "MIT" | ||
| identifier: biotools:grimer | ||
| args_id: "$args" | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information. | ||
| e.g. [ id:'sample1' ] | ||
| - input_table: | ||
| type: file | ||
| description: | | ||
| Tab-separated count/observation table or .biom file. | ||
| Rows are observations; columns are samples. | ||
| pattern: "*.{tsv,biom}" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3475 | ||
| - edam: http://edamontology.org/format_3746 | ||
| - sample_metadata: | ||
| type: file | ||
| description: Tab-separated metadata file. Rows are samples; columns are | ||
| metadata fields. Optional, pass [] to omit. | ||
| pattern: "*.tsv" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3475 | ||
| - config: | ||
| type: file | ||
| description: | | ||
| YAML configuration file defining external tool references, | ||
| controls, and annotations. Optional, pass [] to omit. | ||
| pattern: "*.{yml,yaml}" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 | ||
| output: | ||
| report: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information. | ||
| - "*.html": | ||
| type: file | ||
| description: | | ||
| Interactive HTML dashboard report integrating taxonomy, | ||
| contamination analysis, heatmaps, and correlation plots. | ||
| pattern: "*.html" | ||
| ontologies: [] | ||
| versions_grimer: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - grimer: | ||
| type: string | ||
| description: The name of the tool | ||
| - grimer --version 2>&1 | tail -1: | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - grimer: | ||
| type: string | ||
| description: The name of the tool | ||
| - grimer --version 2>&1 | tail -1: | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@Jonahnki" | ||
| maintainers: | ||
| - "@Jonahnki" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process GRIMER" | ||
| script "../main.nf" | ||
| process "GRIMER" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "grimer" | ||
|
|
||
| test("grimer - tsv - stub") { | ||
|
SPPearce marked this conversation as resolved.
|
||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| def count_table = file(workDir.resolve('test_count_table.tsv').toString()) | ||
| count_table.text = '''#OTU_ID\tsample1\tsample2\tsample3 | ||
| Bacteria;Proteobacteria\t1250\t890\t2100 | ||
| Bacteria;Firmicutes\t430\t1200\t320 | ||
| Viruses;Caudoviricetes\t45\t120\t88 | ||
| ''' | ||
| input[0] = [ | ||
| [ id: 'test_stub' ], | ||
| count_table | ||
| ] | ||
| input[1] = [] | ||
| input[2] = [] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "grimer - tsv - stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test_stub" | ||
| }, | ||
| "test_stub.html:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| "GRIMER", | ||
| "grimer", | ||
| "bash: line 1: grimer: command not found" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't correct ;) |
||
| ] | ||
| ], | ||
| "report": [ | ||
| [ | ||
| { | ||
| "id": "test_stub" | ||
| }, | ||
| "test_stub.html:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_grimer": [ | ||
| [ | ||
| "GRIMER", | ||
| "grimer", | ||
| "bash: line 1: grimer: command not found" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-05-19T20:09:53.966038203", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.04.6" | ||
| } | ||
| } | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is not required (and hasn't been for some time) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| grimer: | ||
| - modules/nf-core/grimer/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.