class DuplexConsensusCaller extends UmiConsensusCaller[DuplexConsensusRead] with LazyLogging

Creates duplex consensus reads from SamRecords that have been grouped by their source molecule but not yet by source strand.

Filters incoming bases by quality before building the duplex.

Output reads and bases are constructed only if there is at least one read from each source molecule strand. Otherwise no filtering is performed.

Note that a consequence of the above is that the output reads can be shorter than _some_ of the input reads if the input reads are of varying length; they will be the length at which there is coverage from both source strands.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DuplexConsensusCaller
  2. LazyLogging
  3. UmiConsensusCaller
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DuplexConsensusCaller(readNamePrefix: String, readGroupId: String = "A", minInputBaseQuality: PhredScore = ..., trim: Boolean = false, errorRatePreUmi: PhredScore = ..., errorRatePostUmi: PhredScore = ..., minReads: Seq[Int] = Seq(1), maxReadsPerStrand: Int = ...)

    readNamePrefix

    the prefix to apply to all consensus read names

    readGroupId

    the read group ID to apply to all created consensus reads

    minInputBaseQuality

    the minimum input base quality score to use a raw read's base

    trim

    if true, quality trim reads in addition to masking. If false just mask.

    errorRatePreUmi

    the estimated rate of errors in the DNA prior to attaching UMIs

    errorRatePostUmi

    the estimated rate of errors in the DNA post attaching UMIs

    minReads

    the minimum number of input reads to a consensus read (see CallDuplexConsensusReads).

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to any2stringadd[DuplexConsensusCaller] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (DuplexConsensusCaller, B)
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to ArrowAssoc[DuplexConsensusCaller] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. val NoCall: Byte
    Attributes
    protected
    Definition Classes
    UmiConsensusCaller
  7. val NoCallQual: PhredScore
    Attributes
    protected
    Definition Classes
    UmiConsensusCaller
  8. def addStatistics(caller: UmiConsensusCaller[DuplexConsensusRead]): Unit

    Adds the given caller's statistics (counts) to this caller.

    Adds the given caller's statistics (counts) to this caller.

    Definition Classes
    UmiConsensusCaller
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. def consensusReadsConstructed: Long

    Returns the number of consensus reads constructed by this caller.

    Returns the number of consensus reads constructed by this caller.

    Definition Classes
    UmiConsensusCaller
  12. final def consensusReadsFromSamRecords(recs: Seq[SamRecord]): Seq[SamRecord]

    Takes in all the reads for a source molecule and, if possible, generates one or more output consensus reads as SAM records.

    Takes in all the reads for a source molecule and, if possible, generates one or more output consensus reads as SAM records.

    recs

    the full set of source SamRecords for a source molecule

    returns

    a seq of consensus SAM records, may be empty

    Definition Classes
    UmiConsensusCaller
  13. def consensusSamRecordsFromSamRecords(recs: Seq[SamRecord]): Seq[SamRecord]

    Takes in all the reads for a source molecule and, if possible, generates one or more output consensus reads as SAM records.

    Takes in all the reads for a source molecule and, if possible, generates one or more output consensus reads as SAM records.

    recs

    the full set of source SamRecords for a source molecule

    returns

    a seq of consensus SAM records, may be empty

    Attributes
    protected
    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  14. def createSamRecord(read: DuplexConsensusRead, readType: ReadType, umis: Seq[String] = Seq.empty): SamRecord

    Creates a SamRecord with a ton of additional tags annotating the duplex read.

    Creates a SamRecord with a ton of additional tags annotating the duplex read.

    Attributes
    protected
    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  15. def emptyClone(): DuplexConsensusCaller

    Returns a clone of this consensus caller in a state where no previous reads were processed.

    Returns a clone of this consensus caller in a state where no previous reads were processed. I.e. all counters are set to zero.

    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  16. def ensuring(cond: (DuplexConsensusCaller) ⇒ Boolean, msg: ⇒ Any): DuplexConsensusCaller
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to Ensuring[DuplexConsensusCaller] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (DuplexConsensusCaller) ⇒ Boolean): DuplexConsensusCaller
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to Ensuring[DuplexConsensusCaller] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: ⇒ Any): DuplexConsensusCaller
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to Ensuring[DuplexConsensusCaller] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): DuplexConsensusCaller
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to Ensuring[DuplexConsensusCaller] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  22. val errorRatePostUmi: PhredScore
  23. val errorRatePreUmi: PhredScore
  24. def filterToMostCommonAlignment(recs: Seq[SourceRead]): Seq[SourceRead]

    Takes in a non-empty seq of SamRecords and filters them such that the returned seq only contains those reads that share the most common alignment of the read sequence to the reference.

    Takes in a non-empty seq of SamRecords and filters them such that the returned seq only contains those reads that share the most common alignment of the read sequence to the reference. If two or more different alignments share equal numbers of reads, the 'most common' will be an arbitrary pick amongst those alignments, and the group of reads with that alignment will be returned.

    For the purposes of this method all that is implied by "same alignment" is that any insertions or deletions are at the same position and of the same length. This is done to allow for differential read length (either due to sequencing or untracked hard-clipping of adapters) and for differential soft-clipping at the starts and ends of reads.

    NOTE: filtered out reads are sent to the rejectRecords method and do not need further handling

    Attributes
    protected[umi]
    Definition Classes
    UmiConsensusCaller
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to StringFormat[DuplexConsensusCaller] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  27. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. def logStatistics(logger: Logger): Unit

    Logs statistics about how many reads were seen, and how many were filtered/discarded due to various filters.

    Logs statistics about how many reads were seen, and how many were filtered/discarded due to various filters.

    Definition Classes
    UmiConsensusCaller
  31. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
  32. val maxReadsPerStrand: Int
  33. val minInputBaseQuality: PhredScore
  34. val minReads: Seq[Int]
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. val readGroupId: String

    A RG.ID to apply to all generated reads.

    A RG.ID to apply to all generated reads.

    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  39. val readNamePrefix: String

    A prefix to use on all read names.

    A prefix to use on all read names. If None then a suitable prefix will be synthesized.

    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  40. def readsFilteredInsufficientSupport: Long

    Returns the number of raw reads filtered out due to there being insufficient reads present to build the necessary set of consensus reads.

    Returns the number of raw reads filtered out due to there being insufficient reads present to build the necessary set of consensus reads.

    Definition Classes
    UmiConsensusCaller
  41. def readsFilteredMinorityAlignment: Long

    Returns the number of raw reads filtered out because their alignment disagreed with the majority alignment of all raw reads for the same source molecule.

    Returns the number of raw reads filtered out because their alignment disagreed with the majority alignment of all raw reads for the same source molecule.

    Definition Classes
    UmiConsensusCaller
  42. def rejectRecords(reason: String, rec: SamRecord*): Unit

    Records that the supplied records were rejected, and not used to build a consensus read.

    Records that the supplied records were rejected, and not used to build a consensus read.

    Attributes
    protected
    Definition Classes
    UmiConsensusCaller
  43. def rejectRecords(recs: Iterable[SamRecord], reason: String): Unit

    Records that the supplied records were rejected, and not used to build a consensus read.

    Records that the supplied records were rejected, and not used to build a consensus read.

    Attributes
    protected
    Definition Classes
    UmiConsensusCaller
  44. def sourceMoleculeId(rec: SamRecord): String

    Returns the MI tag **minus** the trailing suffix that identifies /A vs /B

    Returns the MI tag **minus** the trailing suffix that identifies /A vs /B

    rec

    a SamRecord

    returns

    an identified for the source molecule

    Attributes
    protected[umi]
    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  45. def subGroupRecords(records: Seq[SamRecord]): (Seq[SamRecord], Seq[SamRecord], Seq[SamRecord])

    Split records into those that should make a single-end consensus read, first of pair consensus read, and second of pair consensus read, respectively.

    Split records into those that should make a single-end consensus read, first of pair consensus read, and second of pair consensus read, respectively. This method is overridden in DuplexConsensusCaller to improve performance since no fragment reads should be given to this method.

    Attributes
    protected
    Definition Classes
    DuplexConsensusCallerUmiConsensusCaller
  46. def sum(ss: Array[Short]): Int

    Sums a short array into an Int to avoid overflow.

    Sums a short array into an Int to avoid overflow.

    Attributes
    protected
    Definition Classes
    UmiConsensusCaller
  47. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  48. def toSourceRead(rec: SamRecord, minBaseQuality: PhredScore, trim: Boolean): Option[SourceRead]

    Converts from a SamRecord into a SourceRead.

    Converts from a SamRecord into a SourceRead. During conversion the record is end-trimmed to remove Ns and bases below the minBaseQuality. Remaining bases that are below minBaseQuality are then masked to Ns.

    returns

    Some(SourceRead) if there are any called bases with quality > minBaseQuality, else None

    Attributes
    protected[umi]
    Definition Classes
    UmiConsensusCaller
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. def totalFiltered: Long

    Returns the total number of reads filtered for any reason.

    Returns the total number of reads filtered for any reason.

    Definition Classes
    UmiConsensusCaller
  51. def totalReads: Long

    Returns the total number of input reads examined by the consensus caller so far.

    Returns the total number of input reads examined by the consensus caller so far.

    Definition Classes
    UmiConsensusCaller
  52. val trim: Boolean
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  56. def [B](y: B): (DuplexConsensusCaller, B)
    Implicit
    This member is added by an implicit conversion from DuplexConsensusCaller to ArrowAssoc[DuplexConsensusCaller] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from DuplexConsensusCaller to any2stringadd[DuplexConsensusCaller]

Inherited by implicit conversion StringFormat from DuplexConsensusCaller to StringFormat[DuplexConsensusCaller]

Inherited by implicit conversion Ensuring from DuplexConsensusCaller to Ensuring[DuplexConsensusCaller]

Inherited by implicit conversion ArrowAssoc from DuplexConsensusCaller to ArrowAssoc[DuplexConsensusCaller]

Ungrouped