-
Notifications
You must be signed in to change notification settings - Fork 928
Vembrane filter #9290
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?
Vembrane filter #9290
Changes from all commits
614fef8
0462840
d86ad19
b3d0dab
bc3c80d
c2b7c05
dae0cd9
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::vembrane=2.4.0" |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||
| process VEMBRANE_FILTER { | ||||
| tag "${meta.id}" | ||||
| label 'process_single' | ||||
|
|
||||
| conda "${moduleDir}/environment.yml" | ||||
| container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container | ||||
| ? 'https://depot.galaxyproject.org/singularity/vembrane:2.4.0--pyhdfd78af_0' | ||||
| : 'biocontainers/vembrane:2.4.0--pyhdfd78af_0'}" | ||||
|
|
||||
| input: | ||||
| tuple val(meta), path(variant) | ||||
| val expression | ||||
|
|
||||
| output: | ||||
| tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: filtered_variant | ||||
| path "versions.yml", emit: versions | ||||
|
Comment on lines
+15
to
+16
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. Can you align the emit statements? (I know that this was destroyed by the linter but it looks better in the end :D) |
||||
|
|
||||
| when: | ||||
| task.ext.when == null || task.ext.when | ||||
|
|
||||
| script: | ||||
| def args = task.ext.args ?: '' | ||||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||||
|
|
||||
|
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.
Suggested change
|
||||
| """ | ||||
| vembrane filter \\ | ||||
| ${args} \\ | ||||
| ${expression} \\ | ||||
| -o ${prefix}_filtered.vcf \\ | ||||
| ${variant} | ||||
|
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| vembrane: \$(vembrane --version) | ||||
| END_VERSIONS | ||||
| """ | ||||
|
|
||||
| stub: | ||||
| def args = task.ext.args ?: '' | ||||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||||
|
|
||||
|
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.
Suggested change
|
||||
| """ | ||||
| echo ${args} | ||||
|
|
||||
| vembrane filter \\ | ||||
| ${args} \\ | ||||
| ${expression} \\ | ||||
| -o ${prefix}_filtered.vcf \\ | ||||
| ${variant} | ||||
|
Comment on lines
+45
to
+49
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. For the stub we actually want to create "fake files" that resemble whatever we produce in the script block |
||||
|
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| vembrane: \$(vembrane --version) | ||||
| END_VERSIONS | ||||
| """ | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "vembrane_filter" | ||
| description: write your description here | ||
| keywords: | ||
| - filter | ||
| - table | ||
| - sort | ||
| tools: | ||
| - "vembrane": | ||
| description: "Filter VCF/BCF files with Python expressions." | ||
| homepage: "https://github.com/vembrane/vembrane/tree/main" | ||
| documentation: "https://github.com/vembrane/vembrane/blob/main/docs/filter.md" | ||
| tool_dev_url: "https://github.com/vembrane/vembrane.git" | ||
| doi: "10.1093/bioinformatics/btac810" | ||
| licence: ["MIT"] | ||
| identifier: biotools:vembrane/filter | ||
|
|
||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - variant: | ||
| type: file | ||
| description: | | ||
| Path to the VCF/BCF file to be filtered. | ||
| e.g. 'file.vcf', 'file.vcf.gz', 'file.bcf', 'file.bcf.gz' | ||
| ontologies: [] | ||
| - expression: | ||
| type: string | ||
| description: | | ||
| The filter expression can be any valid python expression that evaluates to a value of type bool. | ||
| e.g. 'ANN["SYMBOL"] == "CDH2"' | ||
| ontologies: [] | ||
|
|
||
| output: | ||
| filtered_variant: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "*.{vcf,bcf,vcf.gz,bcf.gz}": | ||
| type: file | ||
| description: VCF normalized output file | ||
|
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. normalized? |
||
| pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" | ||
| ontologies: [] | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@trangdo-hsc" | ||
| - "@mkatsanto" | ||
| maintainers: | ||
| - "@trangdo-hsc" | ||
|
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. Can you add a stub test as well? :) |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,108 @@ | ||||||||||
| nextflow_process { | ||||||||||
|
|
||||||||||
| name "Test Process VEMBRANE" | ||||||||||
| script "../main.nf" | ||||||||||
| process "VEMBRANE_FILTER" | ||||||||||
|
|
||||||||||
| tag "modules" | ||||||||||
| tag "modules_nfcore" | ||||||||||
| tag "vembrane" | ||||||||||
| tag "vembrane/filter" | ||||||||||
|
|
||||||||||
| test("homo sapiens - vcf") { | ||||||||||
|
|
||||||||||
| // | ||||||||||
| // (the module requires running more than one process to generate the required output) | ||||||||||
| // add the 'setup' method here. | ||||||||||
| // You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules). | ||||||||||
|
|
||||||||||
|
Comment on lines
+14
to
+18
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.
Suggested change
|
||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||
|
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.
Suggested change
|
||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| input[1] = "'QUAL >= 30'" | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assertAll( | ||||||||||
| { assert process.success }, | ||||||||||
| { assert snapshot(process.out).match() } | ||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| test("homo sapiens - vcf.gz") { | ||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||
|
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.
Suggested change
|
||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.vcf.gz', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| input[1] = "'QUAL >= 30'" | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assertAll( | ||||||||||
| { assert process.success }, | ||||||||||
| { assert snapshot( | ||||||||||
| process.out | ||||||||||
| ).match() } | ||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| test("homo sapiens - bcf") { | ||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||
|
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.
Suggested change
|
||||||||||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.bcf', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| input[1] = "'QUAL >= 30'" | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assertAll( | ||||||||||
| { assert process.success }, | ||||||||||
| { assert snapshot(process.out).match() } | ||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| test("homo sapiens - bcf.gz") { | ||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||
|
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.
Suggested change
|
||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.bcf.gz', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| input[1] = "'QUAL >= 30'" | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assertAll( | ||||||||||
| { assert process.success }, | ||||||||||
| { assert snapshot(process.out).match() } | ||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| { | ||
| "homo sapiens - bcf": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,38f3479f9071fbe018226be0aac62354" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ], | ||
| "filtered_variant": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,38f3479f9071fbe018226be0aac62354" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.04.6" | ||
| }, | ||
| "timestamp": "2025-10-29T10:40:44.493576" | ||
| }, | ||
| "homo sapiens - vcf.gz": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,44659c255c5018ba2e5a3b4b80797a57" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ], | ||
| "filtered_variant": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,44659c255c5018ba2e5a3b4b80797a57" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.04.6" | ||
| }, | ||
| "timestamp": "2025-10-29T10:40:40.227725" | ||
| }, | ||
| "homo sapiens - bcf.gz": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,c9be02b5c5e036c25e05f59a94528203" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ], | ||
| "filtered_variant": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,c9be02b5c5e036c25e05f59a94528203" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.04.6" | ||
| }, | ||
| "timestamp": "2025-10-29T10:40:49.157452" | ||
| }, | ||
| "homo sapiens - vcf": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,20af56305296f2b0e52979465f19804b" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ], | ||
| "filtered_variant": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test_filtered.vcf:md5,20af56305296f2b0e52979465f19804b" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,78268fef6c3acebb6a431844197f42d5" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.04.6" | ||
| }, | ||
| "timestamp": "2025-10-29T10:40:35.909472" | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.