class HTS::Bcf::Header

Defined in:

hts/bcf/header.cr

Constant Summary

BCF_TYPE_MAP = {:int => "Integer", :integer => "Integer", :int32 => "Integer", :float => "Float", :real => "Float", :string => "String", :str => "String", :character => "Character", :char => "Character", :flag => "Flag"}

Constructors

Instance Method Summary

Constructor Detail

def self.new(hts_file : Pointer(HTS::LibHTS::HtsFile)) #

[View source]
def self.new(bcf_hdr : Pointer(HTS::LibHTS::BcfHdrT)) #

for clone


[View source]
def self.new #

[View source]

Instance Method Detail

def add_contig(id : String, length : Int | Nil = nil, **attributes) #

[View source]
def add_filter(id : String, description : String, **attributes) #

[View source]
def add_format(id : String, *, number, type, description : String, **attributes) #

[View source]
def add_info(id : String, *, number, type, description : String, **attributes) #

[View source]
def add_meta(key : String, value : String | Nil = nil, **attributes) #

[View source]
def add_sample(sample, sync : Bool = true) #

[View source]
def append(line) #

[View source]
def clone #

[View source]
def delete(bcf_hl_type, key = nil) #

[View source]
def edit(&) #

[View source]
def finalize #

[View source]
def format_type(tag : String) #

Character is reported as :string because htslib exposes both via BCF_HT_STR.


[View source]
def get_tid(name : String) : Int32 #

[View source]
def get_version #

[View source]
def info_type(tag : String) #

Character is reported as :string because htslib exposes both via BCF_HT_STR.


[View source]
def merge(hdr) #

[View source]
def name2id(name : String) : Int32 #

[View source]
def nsamples #

[View source]
def read_bcf(fname) #

[View source]
def remove_contig(id : String) : Bool #

[View source]
def remove_filter(id : String) : Bool #

[View source]
def remove_format(id : String) : Bool #

[View source]
def remove_info(id : String) : Bool #

[View source]
def samples #

[View source]
def set_version(version) #

[View source]
def subset(sample_names : Enumerable(String)) #

[View source]
def subset? : Bool #

[View source]
def subset_imap_buffer : Pointer(Int32) #

[View source]
def subset_sample_count : Int32 #

[View source]
def subset_samples : Array(String)? #

[View source]
def sync #

[View source]
def target_count : Int32 #

[View source]
def target_name(rid : Int32) : String #

[View source]
def target_names : Array(String) #

[View source]
def to_s(io : IO) #
Description copied from class Reference

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>

[View source]
def to_unsafe : Pointer(HTS::LibHTS::BcfHdrT) #

[View source]
def update_format(id : String, *, number, type, description : String, **attributes) #

[View source]
def update_info(id : String, *, number, type, description : String, **attributes) #

[View source]