Sha256: aa043a9cb4181de658f3657cf1c126f5081ec090cba6d3ebaa4969ddec0eac24

Contents?: true

Size: 664 Bytes

Versions: 7

Compression:

Stored size: 664 Bytes

Contents

require 'bio-vcf/vcfline'
require 'ndr_support/safe_file'
require_relative 'registry'

module NdrImport
  # This is one of a collection of file handlers that deal with individual formats of data.
  # They can be instantiated directly or via the factory method Registry.tables
  module File
    # This class is a vcf file handler that returns a single table.
    class Vcf < Base
      private

      def rows(&block)
        return enum_for(:rows) unless block

        ::File.read(@filename).each_line do |line|
          next if line =~ /^##/

          yield BioVcf::VcfLine.parse(line)
        end
      end
    end
    Registry.register(Vcf, 'vcf')
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ndr_import-11.2.1 lib/ndr_import/file/vcf.rb
ndr_import-11.2.0 lib/ndr_import/file/vcf.rb
ndr_import-11.1.0 lib/ndr_import/file/vcf.rb
ndr_import-11.0.2 lib/ndr_import/file/vcf.rb
ndr_import-11.0.1 lib/ndr_import/file/vcf.rb
ndr_import-11.0.0 lib/ndr_import/file/vcf.rb
ndr_import-10.3.0 lib/ndr_import/file/vcf.rb