-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New module echtvar/encode
#12040
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
Merged
Merged
New module echtvar/encode
#12040
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f11f2a4
added new module echtvar/encode
sofiademmou bece6bc
fixed meta.yml
sofiademmou d71a9a2
Merge branch 'master' into add-echtvar-encode
sofiademmou 9309be2
Update modules/nf-core/echtvar/encode/main.nf
sofiademmou af204b9
added and changed name for json input
sofiademmou ac08b19
Merge branch 'master' into add-echtvar-encode
sofiademmou 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
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::echtvar=0.2.4" |
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,41 @@ | ||
| process ECHTVAR_ENCODE { | ||
| tag "$meta.id" | ||
| label 'process_single' | ||
|
|
||
| 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/87/87b75cb9e32b89261e8cbdca40b219a5d58fc78ebf92d5ca97c7ca23da1b9517/data': | ||
| 'community.wave.seqera.io/library/echtvar:0.2.4--e59eba33636e3aab' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(vcf) | ||
| tuple val(meta2), path(json_filters) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.zip"), emit: db | ||
| tuple val("${task.process}"), val('echtvar'), eval("echtvar --version | sed 's/echtvar //g'"), emit: versions_echtvar, topic: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| echtvar \\ | ||
|
Felix-Kummer marked this conversation as resolved.
|
||
| encode \\ | ||
| $args \\ | ||
| ${prefix}.zip \\ | ||
| ${json_filters} \\ | ||
| $vcf | ||
| """ | ||
|
|
||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| echo $args | ||
|
|
||
| touch ${prefix}.zip | ||
| """ | ||
| } | ||
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,79 @@ | ||
| name: "echtvar_encode" | ||
| description: Make (encode) a new echtvar file from decomposed vcf | ||
| keywords: | ||
|
Felix-Kummer marked this conversation as resolved.
|
||
| - vcf | ||
| - echtvar | ||
| - encode | ||
| - annotation | ||
| - allele-frequency | ||
| tools: | ||
| - "echtvar": | ||
| description: "Using all the bits for echt rapid variant annotation and filtering." | ||
| homepage: "https://github.com/brentp/echtvar/blob/v0.2.2/README.md" | ||
| documentation: "https://github.com/brentp/echtvar/blob/v0.2.2/README.md" | ||
| tool_dev_url: "https://github.com/brentp/echtvar" | ||
| doi: "10.1093/nar/gkac931" | ||
| licence: | ||
| - "MIT" | ||
| identifier: biotools:echtvar | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - vcf: | ||
| type: file | ||
| description: VCF file | ||
| pattern: "*.vcf" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_3016" | ||
| - - meta2: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - json_filters: | ||
| type: file | ||
| description: JSON file containing the configuration for the encoding process (which columns are pulled from the input VCF and how they are stored) | ||
| pattern: "*.json" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_3464" | ||
| output: | ||
| db: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - "*.zip": | ||
| type: file | ||
| description: Encoded ECHTVAR file | ||
| pattern: "*.zip" | ||
| ontologies: | ||
| - edam: "http://edamontology.org/format_3987" | ||
| versions_echtvar: | ||
| - - "${task.process}": | ||
| type: string | ||
| description: The name of the process | ||
| - "echtvar": | ||
| type: string | ||
| description: The name of the tool | ||
| - "echtvar --version | sed 's/echtvar //g'": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| topics: | ||
| versions: | ||
| - - "${task.process}": | ||
| type: string | ||
| description: The name of the process | ||
| - "echtvar": | ||
| type: string | ||
| description: The name of the tool | ||
| - "echtvar --version | sed 's/echtvar //g'": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@sofiademmou" | ||
| maintainers: | ||
| - "@sofiademmou" | ||
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,93 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process ECHTVAR_ENCODE" | ||
| script "../main.nf" | ||
| process "ECHTVAR_ENCODE" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "echtvar" | ||
| tag "echtvar/encode" | ||
| tag "bcftools/norm" | ||
|
|
||
| config "./nextflow.config" | ||
|
|
||
| setup { | ||
| run("BCFTOOLS_NORM") { | ||
| script "../../../bcftools/norm/main.nf" | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), | ||
| [] | ||
| ] | ||
| input[1] = [ | ||
| [ id:'genome' ], // meta map | ||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| } | ||
|
|
||
| test("homo_sapiens - vcf") { | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| // Create dummy json config file for testing | ||
| def json_config = file("${moduleDir}/tests/config.json") | ||
| json_config.text = '[{"field": "DP", "alias": "gnomad_dp"}]' | ||
|
|
||
| input[0] = BCFTOOLS_NORM.out.vcf | ||
|
|
||
| input[1] = [ | ||
| [ id:'test_db' ], | ||
| file(json_config) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll( | ||
| { assert snapshot( | ||
| sanitizeOutput(process.out) | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("homo_sapiens - vcf - stub") { | ||
|
|
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| // Create dummy json config file for testing | ||
| def json_config = file("${moduleDir}/tests/config.json") | ||
| json_config.text = '[{"field": "DP", "alias": "gnomad_dp"}]' | ||
|
|
||
| input[0] = BCFTOOLS_NORM.out.vcf | ||
|
|
||
| input[1] = [ | ||
| [ id:'test_db' ], | ||
| file(json_config) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll( | ||
| { assert snapshot( | ||
| sanitizeOutput(process.out) | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
| } |
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,54 @@ | ||
| { | ||
| "homo_sapiens - vcf": { | ||
| "content": [ | ||
| { | ||
| "db": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.zip:md5,0c0f642e4c77b2ae78484c915fbe47a1" | ||
| ] | ||
| ], | ||
| "versions_echtvar": [ | ||
| [ | ||
| "ECHTVAR_ENCODE", | ||
| "echtvar", | ||
| "0.2.4" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-06-18T14:42:59.497378002", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "26.03.4" | ||
| } | ||
| }, | ||
| "homo_sapiens - vcf - stub": { | ||
| "content": [ | ||
| { | ||
| "db": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_echtvar": [ | ||
| [ | ||
| "ECHTVAR_ENCODE", | ||
| "echtvar", | ||
| "0.2.4" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-06-18T14:43:04.351665131", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "26.03.4" | ||
| } | ||
| } | ||
| } |
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,5 @@ | ||
| process { | ||
| withName: "BCFTOOLS_NORM" { | ||
| ext.args = ' -m - -w 10000 -O b ' | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.