From 7a45b5064a183b2def342aa2c13c6d105a2d76fd Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Thu, 27 Jul 2023 23:43:56 +0200 Subject: [PATCH] Check for fasta file via initialise instead of schema --- CHANGELOG.md | 5 +++-- lib/WorkflowAtacseq.groovy | 4 ++++ nextflow_schema.json | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804efb67..09c6c298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 2.2.0dev - [date] - +## 2.1.2dev - [date] ### Enhancements & fixes +- Remove fasta from required schema parameter so that when launching from tools it is not required. + ## [[2.1.1](https://github.com/nf-core/atacseq/releases/tag/2.1.1)] - 2022-07-21 - Minor patch release to fix AWS full test. diff --git a/lib/WorkflowAtacseq.groovy b/lib/WorkflowAtacseq.groovy index 235ec444..b4dcae39 100755 --- a/lib/WorkflowAtacseq.groovy +++ b/lib/WorkflowAtacseq.groovy @@ -13,6 +13,10 @@ class WorkflowAtacseq { public static void initialise(params, log) { genomeExistsError(params, log) + if (!params.fasta) { + Nextflow.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file." + } + if (!params.gtf && !params.gff) { log.error "No GTF or GFF3 annotation specified! The pipeline requires at least one of these files." System.exit(1) diff --git a/nextflow_schema.json b/nextflow_schema.json index fd39fea4..2e384c9e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -207,8 +207,7 @@ "help_text": "By default takes the value of the mito_name parameter, if set. However, some plants and algae have chloroplast genomes in addition to a mitochondrial genome and thus mito_name can have values as multiple names that are separated by a | symbol that will break ataqv, in these cases this parameter can be used to overwrite these values.", "fa_icon": "fas fa-signature" } - }, - "required": ["fasta"] + } }, "adapter_trimming_options": { "title": "Adapter trimming options",