#!/usr/bin/env nextflow nextflow.enable.dsl = 2 include { NORMALISE } from './modules/normalise' include { VEP } from './modules/vep' include { LOAD_DB } from './modules/load_db' workflow { if (!params.vcf) error "Provide --vcf" if (workflow.profile.tokenize(',').contains('gcp') && !(params.project && params.bucket)) { error "The gcp profile needs --project and --bucket (or GCP_PROJECT and GCS_BUCKET)" } // Stub runs (CI) have no VEP cache or plugin data on disk. def must_exist = !workflow.stubRun vcf_ch = Channel.fromPath(params.vcf, checkIfExists: true) // In database mode there is no cache to stage. Its placeholder differs from the plugin one: // Nextflow rejects two staged inputs that share a filename. cache = file(params.vep_database ? "${projectDir}/assets/NO_CACHE" : params.vep_cache, checkIfExists: must_exist && !params.vep_database) plugins = file(params.vep_plugin_data ?: "${projectDir}/assets/NO_FILE", checkIfExists: must_exist) NORMALISE(vcf_ch) VEP(NORMALISE.out.vcf, cache, plugins) LOAD_DB(VEP.out.tsv, params.job_id ?: 'dry-run') }