class
HTS::Bam::BaseMod
- HTS::Bam::BaseMod
- Reference
- Object
Overview
Base modification information from MM/ML tags View over a Record's MM/ML tags using htslib base-mod API
Included Modules
- Enumerable(HTS::Bam::BaseMod::Position)
Defined in:
hts/bam/base_mod.crConstant Summary
-
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
Instance Method Summary
-
#[](position : Int32) : Position | Nil
Array-style access to modifications at a query position
-
#at_pos(position : Int32, max_mods : Int32 = 10) : Position | Nil
Get modifications at a specific query position (0-based); returns nil if none
- #close
-
#each(max_mods : Int32 = 10, &block : Position -> )
Iterate over all positions with modifications
-
#each_position(max_mods : Int32 = 10, &block : Position -> )
Alias for clarity and parity with common terminology
- #ensure_parsed!(flags : UInt32 = HTS_MOD_REPORT_UNCHECKED)
- #finalize
-
#modification_types : Array(Int32)
List of modification codes (positive char codes or negative ChEBI)
-
#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.
- #parsed? : Bool
-
#query_type(code : Int32 | String)
Query info about a specific modification code
-
#query_type_at(index : Int32)
Query info about i-th modification type
- #record : HTS::Bam::Record
-
#recorded_types : Array(Int32)
Alias for
#modification_types -
#to_a : Array(Position)
Returns an
Arraywith all the elements in the collection. -
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
Constructor Detail
Instance Method Detail
Array-style access to modifications at a query position
Get modifications at a specific query position (0-based); returns nil if none
Iterate over all positions with modifications
Alias for clarity and parity with common terminology
List of modification codes (positive char codes or negative ChEBI)
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.
Returns an Array with all the elements in the collection.
(1..5).to_a # => [1, 2, 3, 4, 5]
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>