Module: BioVcf::VcfRecordParser

Defined in:
lib/bio-vcf/vcfrecord.rb

Class Method Summary collapse

Class Method Details

.get_format(s) ⇒ Object

Parse the format field into a Hash



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/bio-vcf/vcfrecord.rb', line 61

def VcfRecordParser.get_format s
  if s==$cached_sample_format_s
    $cached_sample_format
  else
    h = {}
    s.split(/:/).each_with_index { |v,i| h[v] = i }
    $cached_sample_format = h
    $cached_sample_format_s = s
    h
  end
end

.get_info(s) ⇒ Object



72
73
74
# File 'lib/bio-vcf/vcfrecord.rb', line 72

def VcfRecordParser.get_info s
  VcfRecordInfo.new(s)
end