From c3aa60cb1c6a17c05053969454ea9ad671d397f2 Mon Sep 17 00:00:00 2001 From: znorgaard Date: Thu, 25 Jul 2024 08:12:28 -0700 Subject: [PATCH] docs: improve doc string accuracy --- .../com/fulcrumgenomics/umi/CollectDuplexSeqMetrics.scala | 4 ++-- src/main/scala/com/fulcrumgenomics/umi/Umis.scala | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/scala/com/fulcrumgenomics/umi/CollectDuplexSeqMetrics.scala b/src/main/scala/com/fulcrumgenomics/umi/CollectDuplexSeqMetrics.scala index 30d807a7c..8e2faa94a 100644 --- a/src/main/scala/com/fulcrumgenomics/umi/CollectDuplexSeqMetrics.scala +++ b/src/main/scala/com/fulcrumgenomics/umi/CollectDuplexSeqMetrics.scala @@ -315,8 +315,8 @@ class CollectDuplexSeqMetrics rec => val exceptionString = s"Input BAM file to CollectDuplexSeqMetrics ($input) appears to contain consensus sequences. " + "CollectDuplexSeqMetrics cannot run on consensus BAMs, and instead requires the UMI-grouped BAM generated " + - "prior to consensus calling. The UMI-grouped BAM is the output of running GroupReadsByUmi." + - s"\nFirst record in $input has consensus SAM tags present:\n$rec" + "by GroupReadsByUmi which is run prior to consensus calling." + + "\nFirst record in $input has consensus SAM tags present:\n$rec" if (Umis.isFgbioStyleConsensus(rec)) throw new IllegalArgumentException(exceptionString) } diff --git a/src/main/scala/com/fulcrumgenomics/umi/Umis.scala b/src/main/scala/com/fulcrumgenomics/umi/Umis.scala index 63cb4e3f7..ed5512567 100644 --- a/src/main/scala/com/fulcrumgenomics/umi/Umis.scala +++ b/src/main/scala/com/fulcrumgenomics/umi/Umis.scala @@ -129,9 +129,10 @@ object Umis { ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' || ch == 'N' || ch == '-' } - /** Tests if a record is a consensus or not + /** Returns True if the record appears to be a consensus read, + * typically produced by fgbio's CallMolecularConsensusReads or CallDuplexConsensusReads. * - * @param rec the record to test + * @param rec the record to check * @return boolean indicating if the record is a consensus or not */ def isFgbioStyleConsensus(rec: SamRecord): Boolean = {