org.bdgenomics.adam.util

# MdTag

###
Related Docs: object MdTag | package util

#### class MdTag extends AnyRef

Represents the mismatches and deletions present in a read that has been aligned to a reference genome. The MD tag can be used to reconstruct the reference that an aligned read overlaps.

Linear Supertypes
AnyRef, Any
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. MdTag
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1. #### new MdTag(start: Long, matches: List[NumericRange[Long]], mismatches: Map[Long, Char], deletions: Map[Long, Char])

   start

     Start position of the alignment.

   matches

     A list of the ranges over which the read has a perfect sequence match.

   mismatches

     A map of all the locations where a base mismatched.

   deletions

     A map of all locations where a base was deleted.

### Value Members

1. #### final def !=(arg0: Any): Boolean

   Definition Classes
     AnyRef → Any

2. #### final def ##(): Int

   Definition Classes
     AnyRef → Any

3. #### final def ==(arg0: Any): Boolean

   Definition Classes
     AnyRef → Any

4. #### final def asInstanceOf[T0]: T0

   Definition Classes
     Any

5. #### def canEqual(other: Any): Boolean

   We can check equality against MdTags.

   We can check equality against MdTags.

   other

     Object to see if we can compare against.

   returns

     Returns True if the object is an MdTag.

6. #### def clone(): AnyRef

   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )

7. #### def countOfMismatches: Int

   Returns the number of mismatches against the reference.

   Returns the number of mismatches against the reference.

   returns

     Number of mismatches against the reference

8. #### def deletedBase(pos: Long): Option[Char]

   Returns the base that was deleted at a position.

   Returns the base that was deleted at a position.

   pos

     Reference based position.

   returns

     The base that was deleted at this position in the reference.

9. #### val deletions: Map[Long, Char]

   A map of all locations where a base was deleted.

10. #### def end(): Long

    Returns the end position of the record described by this MD tag.

    Returns the end position of the record described by this MD tag.

    returns

      The reference based end position of this tag.

11. #### final def eq(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

12. #### def equals(other: Any): Boolean

    We implement equality checking by seeing whether two MD tags are at the same position and have the same value.

    We implement equality checking by seeing whether two MD tags are at the same position and have the same value.

    other

      An object to compare to.

    returns

      True if the object is an MD tag at the same position and with the same string value. Else, false.

    Definition Classes
      MdTag → AnyRef → Any

13. #### def finalize(): Unit

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )

14. #### final def getClass(): Class[_]

    Definition Classes
      AnyRef → Any

15. #### def getReference(readSequence: String, cigar: Cigar, referenceFrom: Long): String

    Given a read sequence, cigar, and a reference start position, returns the reference.

    Given a read sequence, cigar, and a reference start position, returns the reference.

    readSequence

      The base sequence of the read.

    cigar

      The cigar for the read.

    referenceFrom

      The starting point of this read alignment vs. the reference.

    returns

      A string corresponding to the reference overlapping this read.

16. #### def getReference(read: RichAlignmentRecord): String

    Given a read, returns the reference.

    Given a read, returns the reference.

    read

      A read for which one desires the reference sequence.

    returns

      A string corresponding to the reference overlapping this read.

17. #### def hasMismatches: Boolean

    Returns whether this read has any mismatches against the reference.

    Returns whether this read has any mismatches against the reference.

    returns

      True if this read has mismatches. We do not return true if the read has no mismatches but has deletions.

18. #### def hashCode(): Int

    returns

      We implement hashing by hashing the string representation of the MD tag.

    Definition Classes
      MdTag → AnyRef → Any

19. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

20. #### def isMatch(pos: ReferencePosition): Boolean

    Returns whether a base is a match against the reference.

    Returns whether a base is a match against the reference.

    pos

      ReferencePosition object describing where to check.

    returns

      True if base matches reference. False means that the base may be either a mismatch or a deletion.

21. #### def isMatch(pos: Long): Boolean

    Returns whether a base is a match against the reference.

    Returns whether a base is a match against the reference.

    pos

      Reference based position to check.

    returns

      True if base matches reference. False means that the base may be either a mismatch or a deletion.

22. #### val matches: List[NumericRange[Long]]

    A list of the ranges over which the read has a perfect sequence match.

23. #### def mismatchedBase(pos: Long): Option[Char]

    Returns the mismatched base at a position.

    Returns the mismatched base at a position.

    pos

      Reference based position.

    returns

      The base at this position in the reference.

24. #### val mismatches: Map[Long, Char]

    A map of all the locations where a base mismatched.

25. #### final def ne(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

26. #### final def notify(): Unit

    Definition Classes
      AnyRef

27. #### final def notifyAll(): Unit

    Definition Classes
      AnyRef

28. #### val start: Long

    Start position of the alignment.

29. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

30. #### def toString(): String

    Converts an MdTag object to a properly formatted MD string.

    Converts an MdTag object to a properly formatted MD string.

    returns

      MD string corresponding to [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)

    Definition Classes
      MdTag → AnyRef → Any
    See also

      http://zenfractal.com/2013/06/19/playing-with-matches/

31. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

32. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

33. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped