From 0832f655216ed33ef5fd6519b0e0cd0023d5107a Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Tue, 20 Oct 2015 17:43:46 +0200 Subject: [PATCH] Changed error message --- .../nl/lumc/sasc/biopet/core/MultiSampleQScript.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala b/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala index 6c60565a1..f60aeeca8 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala +++ b/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala @@ -48,7 +48,7 @@ trait MultiSampleQScript extends SummaryQScript { /** Adds the library jobs */ final def addAndTrackJobs(): Unit = { if (nameRegex.findFirstIn(libId) == None) - Logging.addError(s"Library '$libId' does not conform to '$nameRegex'") + Logging.addError(s"Library '$libId' $nameError") currentSample = Some(sampleId) currentLib = Some(libId) addJobs() @@ -93,7 +93,7 @@ trait MultiSampleQScript extends SummaryQScript { /** Adds sample jobs */ final def addAndTrackJobs(): Unit = { if (nameRegex.findFirstIn(sampleId) == None) - Logging.addError(s"Sample '$sampleId' does not conform to '$nameRegex'") + Logging.addError(s"Sample '$sampleId' $nameError") currentSample = Some(sampleId) addJobs() qscript.addSummarizable(this, "pipeline", Some(sampleId)) @@ -134,6 +134,10 @@ trait MultiSampleQScript extends SummaryQScript { protected def sampleIds: Set[String] = ConfigUtils.any2map(globalConfig.map("samples")).keySet protected lazy val nameRegex = """^[a-zA-Z0-9][a-zA-Z0-9-_]+[a-zA-Z0-9]$""".r + protected lazy val nameError = " name invalid." + + "Name must have at least 3 characters," + + "must begin and end with an alphanumeric character, " + + "and must not have whitespace." /** Runs addAndTrackJobs method for each sample */ final def addSamplesJobs() { -- GitLab