Skip to content

Commit

Permalink
docs: improve doc string accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
znorgaard committed Jul 25, 2024
1 parent ea80c6c commit c3aa60c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/com/fulcrumgenomics/umi/Umis.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit c3aa60c

Please sign in to comment.