From 05e573aa4908348f394fd72a2ef54b5037d50d1a Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Mon, 20 May 2024 09:55:53 -0700 Subject: [PATCH] Apply suggestions from code review --- src/main/scala/com/fulcrumgenomics/fastq/FastqToBam.scala | 2 +- src/test/scala/com/fulcrumgenomics/umi/UmisTest.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/com/fulcrumgenomics/fastq/FastqToBam.scala b/src/main/scala/com/fulcrumgenomics/fastq/FastqToBam.scala index 982d7db9f..0ff36af9a 100644 --- a/src/main/scala/com/fulcrumgenomics/fastq/FastqToBam.scala +++ b/src/main/scala/com/fulcrumgenomics/fastq/FastqToBam.scala @@ -123,7 +123,7 @@ class FastqToBam validate(input.length == actualReadStructures.length, "input and read-structure must be supplied the same number of times.") validate(1 to 2 contains actualReadStructures.flatMap(_.templateSegments).size, "read structures must contain 1-2 template reads total.") validate(!extractUmisFromReadNames || umiQualTag.isEmpty, "Cannot extract UMI qualities when also extracting UMI from read names.") - validate(!extractUmisFromReadComment || umiQualTag.isEmpty, "Cannot extract UMI qualities when also extracting UMI from read description.") + validate(!extractUmisFromReadComment || umiQualTag.isEmpty, "Cannot extract UMI qualities when also extracting UMI from the comment in the read name.") override def execute(): Unit = { val encoding = qualityEncoding diff --git a/src/test/scala/com/fulcrumgenomics/umi/UmisTest.scala b/src/test/scala/com/fulcrumgenomics/umi/UmisTest.scala index 70adb5249..4c23f3c07 100644 --- a/src/test/scala/com/fulcrumgenomics/umi/UmisTest.scala +++ b/src/test/scala/com/fulcrumgenomics/umi/UmisTest.scala @@ -43,7 +43,7 @@ class UmisTest extends UnitSpec with OptionValues { Umis.extractUmisFromReadName("1:2:3:4:5:6:7:ACGTACGT", strict=true).value shouldBe "ACGTACGT" } - it should "return None if the read has only 7 parts in strict mode" in { + it should "return None if the read name has only 7 parts in strict mode" in { Umis.extractUmisFromReadName("1:2:3:4:5:6:7", strict=true) shouldBe None } @@ -126,7 +126,7 @@ class UmisTest extends UnitSpec with OptionValues { copyUmiFromReadName(rec=rec("UMI:C:ACC+GGT"), removeUmi=true).nameAndUmi shouldBe ("UMI:C", "ACC-GGT") } - it should "split on a different delimiter if specified" in { + it should "split on a different delimiter name if specified" in { copyUmiFromReadName(rec=rec("UMI-A"), delimiter='-').nameAndUmi shouldBe ("UMI-A", "A") copyUmiFromReadName(rec=rec("UMI-C-A"), delimiter='-').nameAndUmi shouldBe ("UMI-C-A", "A") copyUmiFromReadName(rec=rec("UMI-C-ACC+GGT"), delimiter='-').nameAndUmi shouldBe ("UMI-C-ACC+GGT", "ACC-GGT") @@ -136,7 +136,7 @@ class UmisTest extends UnitSpec with OptionValues { copyUmiFromReadName(rec=rec("UMI:C:ACC+GGT")).nameAndUmi shouldBe ("UMI:C:ACC+GGT", "ACC-GGT") } - it should "fail if the read has only one field" in { + it should "fail if the read name has only one field" in { an[Exception] should be thrownBy copyUmiFromReadName(rec=rec("NAME")) an[Exception] should be thrownBy copyUmiFromReadName(rec=rec("1-2")) }