- 
                Notifications
    You must be signed in to change notification settings 
- Fork 928
feat: addition of vembrane table module #9285
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?
Changes from 4 commits
66588fc
              fd659e3
              28d37a0
              a3e35a2
              3dfa74b
              1e91998
              6b07b86
              e268108
              2dae392
              a3327fd
              d707a84
              33daff0
              afcbc53
              ae3b9a1
              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,49 @@ | ||||
|  | ||||
|  | ||||
|          | ||||
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.
fixed in 2dae392
        
          
              
                  famosab marked this conversation as resolved.
              
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "vembrane_table" | ||
| description: Creates tabular (TSV) files from VCF/BCF data with flexible Python expressions | ||
| keywords: | ||
| - vcf | ||
| - bcf | ||
| - table | ||
| - genomics | ||
| - variant | ||
| - annotation | ||
| tools: | ||
| - "vembrane": | ||
| description: "Filter VCF/BCF files with Python expressions" | ||
| homepage: "https://vembrane.github.io/" | ||
| documentation: "https://github.com/vembrane/vembrane/blob/main/docs/table.md" | ||
| tool_dev_url: "https://github.com/vembrane/vembrane" | ||
| doi: "10.1093/bioinformatics/btac810" | ||
| licence: ["MIT"] | ||
| identifier: biotools:vembrane | ||
| args_id: "$args" | ||
|  | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1', single_end:false ]` | ||
| - vcf: | ||
| type: file | ||
| description: VCF/BCF file to extract tabular data from | ||
| pattern: "*.{vcf,vcf.gz,bcf,bcf.gz}" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3016 # VCF | ||
| - expression: | ||
| type: string | ||
| description: A comma-separated tuple of expressions that define the table column contents | ||
|  | ||
| output: | ||
| table: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1', single_end:false ]` | ||
| - "*.tsv": | ||
| type: file | ||
| description: TSV file containing tabular data from VCF/BCF | ||
| pattern: "*.tsv" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3475 # TSV | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@mkatsanto" | ||
| - "@trangdo-hsc" | ||
| maintainers: | ||
| - "@mkatsanto" | ||
| - "@trangdo-hsc" | 
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,135 @@ | ||||||||||||
|  | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| nextflow_process { | ||||||||||||
|  | ||||||||||||
| name "Test Process VEMBRANE_TABLE" | ||||||||||||
| script "../main.nf" | ||||||||||||
| process "VEMBRANE_TABLE" | ||||||||||||
|  | ||||||||||||
| tag "modules" | ||||||||||||
| tag "modules_nfcore" | ||||||||||||
| tag "vembrane" | ||||||||||||
| tag "vembrane/table" | ||||||||||||
|  | ||||||||||||
| test("homo_sapiens - [vcf] - tsv") { | ||||||||||||
|  | ||||||||||||
| when { | ||||||||||||
| process { | ||||||||||||
| """ | ||||||||||||
| input[0] = [ | ||||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf', checkIfExists: true) | ||||||||||||
| ] | ||||||||||||
| input[1] = 'CHROM, POS, REF, ALT, QUAL' | ||||||||||||
| """ | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| then { | ||||||||||||
| assertAll( | ||||||||||||
| { assert process.success }, | ||||||||||||
| { assert snapshot(process.out).match() } | ||||||||||||
| ) | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| test("homo_sapiens - [bcf.gz] - tsv") { | ||||||||||||
|  | ||||||||||||
| when { | ||||||||||||
| process { | ||||||||||||
| """ | ||||||||||||
| input[0] = [ | ||||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/popgen/plink_simulated.bcf.gz', checkIfExists: true) | ||||||||||||
| ] | ||||||||||||
| input[1] = 'CHROM, POS, REF, ALT, QUAL' | ||||||||||||
| """ | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| then { | ||||||||||||
| assertAll( | ||||||||||||
| { assert process.success }, | ||||||||||||
| { assert snapshot(process.out).match() } | ||||||||||||
| ) | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| test("homo_sapiens - [vcf] - csv - custom_separator") { | ||||||||||||
|  | ||||||||||||
| config "./nextflow.config" | ||||||||||||
|  | ||||||||||||
| when { | ||||||||||||
| params { | ||||||||||||
| vembrane_args = '--separator ,' | ||||||||||||
| } | ||||||||||||
| process { | ||||||||||||
| """ | ||||||||||||
| input[0] = [ | ||||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf', checkIfExists: true) | ||||||||||||
| ] | ||||||||||||
| input[1] = 'CHROM, POS, REF, ALT' | ||||||||||||
| """ | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| then { | ||||||||||||
| assertAll( | ||||||||||||
| { assert process.success }, | ||||||||||||
| { assert snapshot(process.out).match() } | ||||||||||||
| ) | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| test("homo_sapiens - [vcf] - tsv - custom_header") { | ||||||||||||
|  | ||||||||||||
| config "./nextflow.config" | ||||||||||||
|  | ||||||||||||
| when { | ||||||||||||
| params { | ||||||||||||
| vembrane_args = '--header "Chromosome,Position,Variant_ID,Quality"' | ||||||||||||
| } | ||||||||||||
| process { | ||||||||||||
| """ | ||||||||||||
| input[0] = [ | ||||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf', checkIfExists: true) | ||||||||||||
| ] | ||||||||||||
| input[1] = 'CHROM, POS, ID, QUAL' | ||||||||||||
| """ | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| then { | ||||||||||||
| assertAll( | ||||||||||||
| { assert process.success }, | ||||||||||||
| { assert snapshot(process.out).match() } | ||||||||||||
| ) | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| test("homo_sapiens - [vcf] - tsv - stub") { | ||||||||||||
|  | ||||||||||||
| options "-stub" | ||||||||||||
|  | ||||||||||||
| when { | ||||||||||||
| process { | ||||||||||||
| """ | ||||||||||||
| input[0] = [ | ||||||||||||
| [ id:'test', single_end:false ], // meta map | ||||||||||||
|         
                  mkatsanto marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||||||||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf', checkIfExists: true) | ||||||||||||
| ] | ||||||||||||
| input[1] = 'CHROM, POS, REF, ALT, QUAL' | ||||||||||||
| """ | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
|  | ||||||||||||
| then { | ||||||||||||
| assertAll( | ||||||||||||
| { assert process.success }, | ||||||||||||
| { assert snapshot(process.out).match() } | ||||||||||||
|          | ||||||||||||
| { assert snapshot(process.out).match() } | |
| { assert snapshot( | |
| process.out, | |
| path(process.out.versions[0]).yaml | |
| ).match() } | 
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.
fixed in 3dfa74b
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.
this fix causes a syntax error
will update with { assert snapshot(process.out.versions).match("versions") }
update: snapshot was obsolete reimplementing
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.
huh this should not lead to an error
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.
snapshot was obsolete reimplementing
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.
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.
nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment modules/nf-core/vembrane/table/main.nf
Nextflow linting complete!
✅ 1 file had no errors (1 formatted)