Merge pull request #1742 from nvnieuwk/add-optional-fasta-parameter-to-ensemblvep

add optional fasta argument to ensemblvep
This commit is contained in:
Maxime U. Garcia 2022-06-09 12:03:52 +02:00 committed by GitHub
commit 6e732f5499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 4 deletions

View file

@ -13,6 +13,7 @@ process ENSEMBLVEP {
val species
val cache_version
path cache
path fasta
path extra_files
output:
@ -27,6 +28,8 @@ process ENSEMBLVEP {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def dir_cache = cache ? "\${PWD}/${cache}" : "/.vep"
def reference = fasta ? "--fasta $fasta" : ""
"""
mkdir $prefix
@ -34,6 +37,7 @@ process ENSEMBLVEP {
-i $vcf \\
-o ${prefix}.ann.vcf \\
$args \\
$reference \\
--assembly $genome \\
--species $species \\
--cache \\

View file

@ -36,6 +36,11 @@ input:
type: file
description: |
path to VEP cache (optional)
- fasta:
type: file
description: |
reference FASTA file (optional)
pattern: "*.{fasta,fa}"
- extra_files:
type: tuple
description: |

View file

@ -4,11 +4,22 @@ nextflow.enable.dsl = 2
include { ENSEMBLVEP } from '../../../modules/ensemblvep/main.nf'
workflow test_ensemblvep {
workflow test_ensemblvep_fasta {
input = [
[ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
]
ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] )
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], fasta, [] )
}
workflow test_ensemblvep_no_fasta {
input = [
[ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
]
ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [], [] )
}

View file

@ -1,5 +1,13 @@
- name: ensemblvep test_ensemblvep
command: nextflow run ./tests/modules/ensemblvep -entry test_ensemblvep -c ./tests/config/nextflow.config -c ./tests/modules/ensemblvep/nextflow.config
- name: ensemblvep test_ensemblvep_fasta
command: nextflow run ./tests/modules/ensemblvep -entry test_ensemblvep_fasta -c ./tests/config/nextflow.config -c ./tests/modules/ensemblvep/nextflow.config
tags:
- ensemblvep
files:
- path: output/ensemblvep/test.ann.vcf
- path: output/ensemblvep/test.summary.html
- name: ensemblvep test_ensemblvep_no_fasta
command: nextflow run ./tests/modules/ensemblvep -entry test_ensemblvep_no_fasta -c ./tests/config/nextflow.config -c ./tests/modules/ensemblvep/nextflow.config
tags:
- ensemblvep
files: