Module: BioVcf::VcfHeaderParser

Defined in:
lib/bio-vcf/vcfheader.rb,
lib/bio-vcf/vcfheader_line.rb

Defined Under Namespace

Modules: RagelKeyValues

Class Method Summary collapse

Class Method Details

.get_column_names(lines) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/bio-vcf/vcfheader.rb', line 16

def VcfHeaderParser.get_column_names(lines)
  lines.each do | line |
    if line =~ /^#[^#]/
      # the first line that starts with a single hash 
      names = line.split
      names[0].sub!(/^#/,'')
      return names
    end
  end
  nil
end

.parse_field(line, debug) ⇒ Object



28
29
30
# File 'lib/bio-vcf/vcfheader.rb', line 28

def VcfHeaderParser.parse_field(line, debug)
  BioVcf::VcfHeaderParser::RagelKeyValues.run_lexer(line, debug: debug)
end