class

HTS::Bam::BaseMod

Inherits Enumerable < Reference < Object

Base modification information from MM/ML tags View over a Record's MM/ML tags using htslib base-mod API

Constants

HTS_MOD_REPORT_UNCHECKED = 1_u32

Default flags for parsing base modifications via htslib HTS_MOD_REPORT_UNCHECKED = 1 (report unvalidated mods instead of failing)

Constructors

new(record : HTS::Bam::Record, auto_parse : Bool = true)
Source

Instance methods

[](position : Int32) : Position | Nil

Array-style access to modifications at a query position

Source
at_pos(position : Int32, max_mods : Int32 = 10) : Position | Nil

Get modifications at a specific query position (0-based); returns nil if none

Source
close
Source
each(max_mods : Int32 = 10, & : Position -> )

Iterate over all positions with modifications

Source
each_position(max_mods : Int32 = 10, &block : Position -> )

Alias for clarity and parity with common terminology

Source
ensure_parsed!(flags : UInt32 = HTS_MOD_REPORT_UNCHECKED)
Source
finalize
Source
modification_types

List of modification codes (positive char codes or negative ChEBI)

Source
parse(flags : UInt32 = HTS_MOD_REPORT_UNCHECKED) : Int32

Parse MM/ML tags; flags per HTSlib (e.g., HTS_MOD_REPORT_UNCHECKED = 1) Default to reporting unchecked modifications so we see MM/ML content without strict validation.

Source
parsed?
Source
query_type(code : Int32)

Query info about a specific modification code

Source
query_type(code : Char)
Source
query_type(code : String)
Source
query_type_at(index : Int32)

Query info about i-th modification type

Source
record
Source
recorded_types

Alias for modification_types

Source
to_a

Returns an Array with all the elements in the collection.

(1..5).to_a # => [1, 2, 3, 4, 5]
Source
to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source

Nested types