org.bdgenomics.adam.models

SequenceDictionary

class SequenceDictionary extends Serializable

SequenceDictionary contains the (bijective) map between Ints (the referenceId) and Strings (the referenceName) from the header of a BAM file, or the combined result of multiple such SequenceDictionaries.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SequenceDictionary
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SequenceDictionary(recordsIn: Array[SequenceRecord])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(record: SequenceRecord): SequenceDictionary

  5. def ++(recs: Array[SequenceRecord]): SequenceDictionary

  6. def ++(dict: SequenceDictionary): SequenceDictionary

  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. def apply(name: CharSequence): SequenceRecord

    Returns the sequence record associated with a specific contig name.

    Returns the sequence record associated with a specific contig name.

    name

    Name to search for.

    returns

    SequenceRecord associated with this record.

    Exceptions thrown
    AssertionError

    Throws assertion error if sequence corresponding to contig name is not found.

  10. def apply(id: Int): SequenceRecord

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def assignments: Map[Int, CharSequence]

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def containsRefId(id: Int): Boolean

    Returns true if this sequence dictionary contains a reference with the specified (integer) ID.

    Returns true if this sequence dictionary contains a reference with the specified (integer) ID.

    id

    refId to look for

    returns

    True if the refId is in this dictionary

  15. def containsRefName(name: CharSequence): Boolean

    Returns true if this sequence dictionary contains a reference with a specific name.

    Returns true if this sequence dictionary contains a reference with a specific name.

    name

    Reference name to look for.

    returns

    True if reference is in this dictionary.

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(x: Any): Boolean

    Definition Classes
    SequenceDictionary → AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def getReferenceNames(): Iterable[String]

    Returns the reference names stored in this dictionary.

    Returns the reference names stored in this dictionary.

    returns

    Returns the reference names in this dictionary.

  21. def hashCode(): Int

    Definition Classes
    SequenceDictionary → AnyRef → Any
  22. def isCompatibleWith(dict: SequenceDictionary): Boolean

    Tests whether two dictionaries are compatible, where "compatible" means that shared referenceName values are associated with the same referenceId, and shared referenceId values are associated with the same referenceName.

    Tests whether two dictionaries are compatible, where "compatible" means that shared referenceName values are associated with the same referenceId, and shared referenceId values are associated with the same referenceName.

    Roughly, two dictionaries are compatible if the ++ operator will succeed when called on them together.

    dict

    The other dictionary with which to test compatibility

    returns

    true if the dictionaries are compatible, false otherwise.

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def mapTo(dict: SequenceDictionary): Map[Int, Int]

    Produces a Map of Int -> Int which maps the referenceIds from this SequenceDictionary into referenceIds compatible with the argument SequenceDictionary ('dict').

    Produces a Map of Int -> Int which maps the referenceIds from this SequenceDictionary into referenceIds compatible with the argument SequenceDictionary ('dict').

    There are basically three cases that we have to handle here: (1) ids for the same sequence name which are different between the dictionaries. These are converted (from this.referenceId into dict.referenceId). (2) ids which are in use (for different sequences) between the two dictionaries. In this case, we mint a new identifier (using nonoverlappingHash) for the sequence in this dictionary that won't conflict with any sequence in either dictionary. (3) ids for sequences that aren't in the argument dict, and which don't conflict as in (2), can be carried over as-is.

    (Note: if the source referenceId isn't in the Map produced by mapTo, we can assume that it can be used without change in the new dictionary. The method remap, below, actually implements this identity.)

    The results of this mapTo should be useable by remap to produce a "compatible" dictionary, i.e. for all d1 and d2,

    d1.remap(d1.mapTo(d2)).isCompatibleWith(d2)

    should be true.

    dict

    The target dictionary into whose referenceId space the ids of this dictionary should be mapped.

    returns

    A Map whose values change the referenceIds in this dictionary; every referenceId in the source dictionary should be present in this Map

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

    Definition Classes
    AnyRef
  26. def nonoverlappingHash(x: CharSequence): Int

  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def records: Set[SequenceRecord]

  30. val recordsIn: Array[SequenceRecord]

  31. def remap(idTransform: Map[Int, Int]): SequenceDictionary

    See the note to mapTo, above.

    See the note to mapTo, above. The results of this remap and mapTo should be to produce a "compatible" dictionary, i.e. for all d1 and d2,

    d1.remap(d1.mapTo(d2)).isCompatibleWith(d2)

    should be true.

    idTransform

    The Map[Int,Int] to transform the identifiers of this dictionary; e.g. the output of mapTo.

    returns

    A new SequenceDictionary with just the referenceIds mapped through the given Map argument.

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

    Definition Classes
    AnyRef
  33. def toSAMSequenceDictionary(): SAMSequenceDictionary

    Converts this ADAM style sequence dictionary into a SAM style sequence dictionary.

    Converts this ADAM style sequence dictionary into a SAM style sequence dictionary.

    returns

    Returns a SAM formatted sequence dictionary.

  34. def toString(): String

    Definition Classes
    SequenceDictionary → AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped