Repository navigation
New module: spoligotyper #13085
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
Open
duceppemo
wants to merge
3
commits into
nf-core:master
Choose a base branch
from
duceppemo:spoligotyper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New module: spoligotyper #13085
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,186 changes: 1,186 additions & 0 deletions
1,186
modules/nf-core/spoligotyper/.conda-lock/linux_amd64-bd-679a58efe8efff70_1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
1,076 changes: 1,076 additions & 0 deletions
1,076
modules/nf-core/spoligotyper/.conda-lock/linux_arm64-bd-872d67a3849f499b_1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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::spoligotyper=0.9.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| process SPOLIGOTYPER { | ||
| tag "${meta.id}" | ||
| label 'process_low' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container | ||
| ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/18/18627f630e2f90d14aa45effad5909fb77092cb48534b7d677f91f029c65d2de/data' | ||
| : 'community.wave.seqera.io/library/spoligotyper:0.9.0--679a58efe8efff70'}" | ||
|
|
||
| input: | ||
| tuple val(meta), path(reads) | ||
|
|
||
| output: | ||
| tuple val(meta), path("${prefix}_spoligotyping.txt") , emit: tsv | ||
| tuple val(meta), path("${prefix}_spoligotyping.json") , emit: json | ||
| tuple val(meta), path("${prefix}_spoligotyping.pdf") , emit: pdf, optional: true | ||
| tuple val(meta), path("${prefix}_spoligotyping_mqc.json"), emit: multiqc | ||
| tuple val("${task.process}"), val('spoligotyper'), eval("spoligotyper --version | sed 's/spoligotyper //'"), emit: versions_spoligotyper, topic: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| prefix = task.ext.prefix ?: "${meta.id}" | ||
| // Reads (single-end or paired-end) or an assembly: spoligotyper detects the file type | ||
| def input = reads instanceof List && reads.size() == 2 ? "-r1 \"${reads[0]}\" -r2 \"${reads[1]}\"" : "-r1 \"${reads}\"" | ||
| """ | ||
| spoligotyper \\ | ||
| $args \\ | ||
| $input \\ | ||
| --sample "${prefix}" \\ | ||
| --output . \\ | ||
| --threads $task.cpus | ||
| """ | ||
|
|
||
| stub: | ||
| prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch "${prefix}_spoligotyping.txt" "${prefix}_spoligotyping.json" "${prefix}_spoligotyping.pdf" "${prefix}_spoligotyping_mqc.json" | ||
| """ | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| name: spoligotyper | ||
| description: In silico spoligotyping, species check and lineage of Mycobacterium tuberculosis complex samples | ||
| keywords: | ||
| - Mycobacterium tuberculosis | ||
| - Mycobacterium bovis | ||
| - spoligotyping | ||
| - genotyping | ||
| - lineage | ||
| tools: | ||
| - spoligotyper: | ||
| description: | | ||
| In silico spoligotyping of Mycobacterium tuberculosis complex samples from reads or assemblies, with a | ||
| species check (regions of difference) and the lineage (SNP barcode), and a PDF report for quality assurance | ||
| homepage: https://github.com/duceppemo/spoligotyper | ||
| documentation: https://github.com/duceppemo/spoligotyper/wiki | ||
| tool_dev_url: https://github.com/duceppemo/spoligotyper | ||
| doi: "10.5281/zenodo.22926160" | ||
| licence: | ||
| - "MIT" | ||
| identifier: "" | ||
| args_id: "$args" | ||
|
|
||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - reads: | ||
| type: file | ||
| description: Single-end or paired-end reads (fastq), or an assembly (fasta), gzipped or not | ||
| pattern: "*.{fastq,fq,fasta,fa,fna,fas}{,.gz}" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_1930 # FASTQ | ||
| - edam: http://edamontology.org/format_1929 # FASTA | ||
| output: | ||
| tsv: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "${prefix}_spoligotyping.txt": | ||
| type: file | ||
| description: Tab-separated table with the spoligotype, species, lineage and warnings | ||
| pattern: "*_spoligotyping.txt" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3475 # TSV | ||
| json: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "${prefix}_spoligotyping.json": | ||
| type: file | ||
| description: All the results and run information | ||
| pattern: "*_spoligotyping.json" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3464 # JSON | ||
| pdf: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "${prefix}_spoligotyping.pdf": | ||
| type: file | ||
| description: Optional. PDF report for quality assurance (not written with --no-pdf) | ||
| pattern: "*_spoligotyping.pdf" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3508 # PDF | ||
| multiqc: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "${prefix}_spoligotyping_mqc.json": | ||
| type: file | ||
| description: MultiQC custom content table | ||
| pattern: "*_spoligotyping_mqc.json" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3464 # JSON | ||
| versions_spoligotyper: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
| - spoligotyper: | ||
| type: string | ||
| description: The tool name | ||
| - "spoligotyper --version | sed 's/spoligotyper //'": | ||
| type: eval | ||
| description: The version of the tool | ||
|
|
||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The process the versions were collected from | ||
| - spoligotyper: | ||
| type: string | ||
| description: The tool name | ||
| - "spoligotyper --version | sed 's/spoligotyper //'": | ||
| type: eval | ||
| description: The version of the tool | ||
|
|
||
| authors: | ||
| - "@duceppemo" | ||
| maintainers: | ||
| - "@duceppemo" | ||
| containers: | ||
| docker: | ||
| linux/amd64: | ||
| name: community.wave.seqera.io/library/spoligotyper:0.9.0--679a58efe8efff70 | ||
| build_id: bd-679a58efe8efff70_1 | ||
| scan_id: sc-0c292160a28f85ac_1 | ||
| linux/arm64: | ||
| name: community.wave.seqera.io/library/spoligotyper:0.9.0--872d67a3849f499b | ||
| build_id: bd-872d67a3849f499b_1 | ||
| scan_id: sc-448dd396d71a4062_1 | ||
| singularity: | ||
| linux/arm64: | ||
| name: oras://community.wave.seqera.io/library/spoligotyper:0.9.0--964817015cdc198a | ||
| build_id: bd-964817015cdc198a_1 | ||
| https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d7/d75cbca42d0b437d193d5f9e54428ca9302f3c9cfcf8f472b2bf972d08948433/data | ||
| linux/amd64: | ||
| name: oras://community.wave.seqera.io/library/spoligotyper:0.9.0--a133deb816fb42d2 | ||
| build_id: bd-a133deb816fb42d2_1 | ||
| https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/18/18627f630e2f90d14aa45effad5909fb77092cb48534b7d677f91f029c65d2de/data | ||
| conda: | ||
| linux/amd64: | ||
| lock_file: modules/nf-core/spoligotyper/.conda-lock/linux_amd64-bd-679a58efe8efff70_1.txt | ||
| linux/arm64: | ||
| lock_file: modules/nf-core/spoligotyper/.conda-lock/linux_arm64-bd-872d67a3849f499b_1.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process SPOLIGOTYPER" | ||
| script "../main.nf" | ||
| process "SPOLIGOTYPER" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "spoligotyper" | ||
|
|
||
| // nf-core test data has no M. tuberculosis complex genome: these tests check that the module runs and | ||
| // writes its outputs ("MTBC not detected" is the expected result). | ||
| test("sarscov2 - fasta") { | ||
|
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. Put a bare |
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:true ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| // Stable checks for the unstable channels: json and pdf embed run timestamps | ||
| { assert path(process.out.tsv[0][1]).text.contains('MTBC not detected') }, | ||
| { assert path(process.out.json[0][1]).text.contains('MTBC not detected') }, | ||
| { assert file(process.out.pdf[0][1]).length() > 0 }, | ||
| { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["json", "pdf"])).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("sarscov2 - paired-end fastq") { | ||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:false ], | ||
| [ | ||
| 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) | ||
| ] | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| // Stable checks for the unstable channels: json and pdf embed run timestamps | ||
| { assert path(process.out.tsv[0][1]).text.contains('fastq') }, | ||
| { assert path(process.out.json[0][1]).text.contains('fastq') }, | ||
| { assert file(process.out.pdf[0][1]).length() > 0 }, | ||
| { assert snapshot(sanitizeOutput(process.out, unstableKeys: ["json", "pdf"])).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("sarscov2 - fasta - stub") { | ||
| options "-stub" | ||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test', single_end:true ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The tool is missing
args_id: "$args".