object Bams extends LazyLogging

Utility methods for working with BAMs.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bams
  2. LazyLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. val AlignmentTags: Seq[String]

    Auxillary tags that should be cleared or re-calculated when unmapping or changing the alignment of a SamRecord.

  5. val MaxInMemory: Int

    The default maximum # of records to keep and sort in memory.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def insertCoordinates(rec: SamRecord): (Int, Int)

    Calculates the coordinates of the insert represented by this record and returns them as a pair of 1-based closed ended coordinates.

    Calculates the coordinates of the insert represented by this record and returns them as a pair of 1-based closed ended coordinates.

    Invalid to call on a read that is not mapped in a pair to the same chromosome as it's mate.

    returns

    the start and end position of the insert as a tuple, always with start <= end

  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def positionFromOtherEndOfTemplate(rec: SamRecord, genomicPosition: Int): Option[Int]

    If the read is mapped in an FR pair, returns the distance of the position from the other end of the template, other wise returns None.

    If the read is mapped in an FR pair, returns the distance of the position from the other end of the template, other wise returns None.

    rec

    the SamRecord whose insert to calculate the position within

    genomicPosition

    the genomic position of interest (NOT the position within the read)

  20. def queryGroupedIterator(iterator: Iterator[SamRecord], header: SAMFileHeader, maxInMemory: Int, tmpDir: FgBioDef.DirPath): SelfClosingIterator[SamRecord]

    Returns an iterator over the records in the given reader in such a way that all reads with the same query name are adjacent in the iterator.

    Returns an iterator over the records in the given reader in such a way that all reads with the same query name are adjacent in the iterator. Does NOT guarantee a queryname sort, merely a query grouping.

    iterator

    an iterator from which to consume records

    header

    the header associated with the records.

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    an optional temp directory to use for temporary sorting files if needed

    returns

    an Iterator with reads from the same query grouped together

  21. def queryGroupedIterator(in: SamSource, maxInMemory: Int = MaxInMemory, tmpDir: FgBioDef.DirPath = Io.tmpDir): BetterBufferedIterator[SamRecord]

    Returns an iterator over the records in the given reader in such a way that all reads with the same query name are adjacent in the iterator.

    Returns an iterator over the records in the given reader in such a way that all reads with the same query name are adjacent in the iterator. Does NOT guarantee a queryname sort, merely a query grouping.

    in

    a SamReader from which to consume records

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    an optional temp directory to use for temporary sorting files if needed

    returns

    an Iterator with reads from the same query grouped together

  22. def regenerateNmUqMdTags(rec: SamRecord, ref: ReferenceSequenceFileWalker): Unit

    Ensures that any NM/UQ/MD tags on the read are accurate.

    Ensures that any NM/UQ/MD tags on the read are accurate. If the read is unmapped, any existing values are removed. If the read is mapped all three tags will have values regenerated.

    rec

    the SamRecord to update

    ref

    a reference sequence file walker to pull the reference information from

  23. def sortByTag[A](iterator: Iterator[SamRecord], header: SAMFileHeader, maxInMemory: Int = MaxInMemory, tmpDir: FgBioDef.DirPath = Io.tmpDir, tag: String, defaultValue: Option[A] = None)(implicit ordering: Ordering[A]): Iterator[SamRecord]

    Returns an iterator over the records in the given iterator such that the order of the records returned is determined by the value of the given SAM tag.

    Returns an iterator over the records in the given iterator such that the order of the records returned is determined by the value of the given SAM tag.

    A

    the type of the SAM tag

    iterator

    an iterator from which to consume records

    header

    the header to use for the sorted records

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    the temporary directory to use when spilling to disk

    tag

    the SAM tag (two-letter key) to sort by

    defaultValue

    the default value, if any, otherwise require all records to have the SAM tag.

    ordering

    the ordering of A.

    returns

    an Iterator over records sorted by the given SAM tag.

  24. def sortByTransformedTag[A, B](iterator: Iterator[SamRecord], header: SAMFileHeader, maxInMemory: Int = MaxInMemory, tmpDir: FgBioDef.DirPath = Io.tmpDir, tag: String, defaultValue: Option[A] = None, transform: (A) ⇒ B)(implicit ordering: Ordering[B]): Iterator[SamRecord]

    Returns an iterator over the records in the given iterator such that the order of the records returned is determined by the value of the given SAM tag, which can optionally be transformed.

    Returns an iterator over the records in the given iterator such that the order of the records returned is determined by the value of the given SAM tag, which can optionally be transformed.

    A

    the type of the SAM tag

    B

    the type of the SAM tag after any transformation, or just A if no transform is given.

    iterator

    an iterator from which to consume records

    header

    the header to use for the sorted records

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    the temporary directory to use when spilling to disk

    tag

    the SAM tag (two-letter key) to sort by

    defaultValue

    the default value, if any, otherwise require all records to have the SAM tag.

    transform

    the transform to apply to the value of the SAM tags (default is the identity)

    ordering

    the ordering of B.

    returns

    an Iterator over records sorted by the given SAM tag, optionally transformed.

  25. def sorter(order: SamOrder, header: SAMFileHeader, maxRecordsInRam: Int = MaxInMemory, tmpDir: FgBioDef.DirPath = Io.tmpDir): Sorter[SamRecord, A]

    Generates a com.fulcrumgenomics.util.Sorter for doing disk-backed sorting of objects.

  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def templateIterator(iterator: Iterator[SamRecord], header: SAMFileHeader, maxInMemory: Int, tmpDir: FgBioDef.DirPath): SelfClosingIterator[Template]

    Returns an iterator of Template objects generated from all the reads in the SamReader.

    Returns an iterator of Template objects generated from all the reads in the SamReader. If the SamReader is not query sorted or grouped, a sort to queryname will be performed.

    iterator

    an iterator from which to consume records

    header

    the header associated with the records.

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    an optional temp directory to use for temporary sorting files if needed

    returns

    an Iterator of Template objects

  28. def templateIterator(in: SamSource, maxInMemory: Int = MaxInMemory, tmpDir: FgBioDef.DirPath = Io.tmpDir): SelfClosingIterator[Template]

    Returns an iterator of Template objects generated from all the reads in the SamReader.

    Returns an iterator of Template objects generated from all the reads in the SamReader. If the SamReader is not query sorted or grouped, a sort to queryname will be performed.

    in

    a SamReader from which to consume records

    maxInMemory

    the maximum number of records to keep and sort in memory if sorting is needed

    tmpDir

    an optional temp directory to use for temporary sorting files if needed

    returns

    an Iterator of Template objects

  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped