From e1dcbabb6ad8dadc825537ef22914b1872e85337 Mon Sep 17 00:00:00 2001 From: znorgaard Date: Mon, 16 Dec 2024 11:53:00 -0800 Subject: [PATCH] test: check metric values --- .../scala/com/fulcrumgenomics/umi/GroupReadsByUmiTest.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/scala/com/fulcrumgenomics/umi/GroupReadsByUmiTest.scala b/src/test/scala/com/fulcrumgenomics/umi/GroupReadsByUmiTest.scala index 4d38217ed..19ddc76d5 100644 --- a/src/test/scala/com/fulcrumgenomics/umi/GroupReadsByUmiTest.scala +++ b/src/test/scala/com/fulcrumgenomics/umi/GroupReadsByUmiTest.scala @@ -33,6 +33,7 @@ import com.fulcrumgenomics.cmdline.FgBioMain.FailureException import com.fulcrumgenomics.testing.SamBuilder.{Minus, Plus} import com.fulcrumgenomics.testing.{SamBuilder, UnitSpec} import com.fulcrumgenomics.umi.GroupReadsByUmi._ +import com.fulcrumgenomics.util.Metric import org.scalatest.{OptionValues, PrivateMethodTester} import java.nio.file.Files @@ -268,7 +269,9 @@ class GroupReadsByUmiTest extends UnitSpec with OptionValues with PrivateMethodT hist.toFile.exists() shouldBe true - metrics.toFile.exists() shouldBe true + // TODO: Create a more comprehensive test case + val expectedMetric = UmiGroupingMetric(sam_records = 10, filtered_non_pf = 0, filtered_poor_alignment = 2, filtered_ns_in_umi = 0, filtered_umis_to_short = 0) + Metric.read[UmiGroupingMetric](metrics) shouldEqual Seq(expectedMetric) // Make sure that we skip sorting for TemplateCoordinate val sortMessage = "Sorting the input to TemplateCoordinate order"