genome-rb 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68bbae81342f57b41aaacd150e3a36acb5eac0f2
4
- data.tar.gz: 986ca4c8dacb3b2b0a2a48d41c70e1abfcf119f7
3
+ metadata.gz: ebe497996e7d2598a811469a808fa9998e0a6593
4
+ data.tar.gz: 8fe4e3d8de204dfa36f4c708c7b1b3906ad7886b
5
5
  SHA512:
6
- metadata.gz: dc93c022fedafb6e1528f14d3c526701680b394cded7bd7828e73e876e1bceac98caa9beca5600bec2de5838a75e6bdf5a202a44d63278f78803dd432c9d3561
7
- data.tar.gz: 1032afb33b2a4602a023954d40b9258386b9aaa809af5eeaedbabb92015751d5ed27fb736f148eb954357f2dc433c15f701b03ac6fd36c169e62b92ac05d07fa
6
+ metadata.gz: 66210100b671742260a4aef410a825200fa31d9dace732fba1bad31c5f064538899e5f2e56084faeb3fccdcee16604e555c09c7140fc5654a7ef4fd98bca2835
7
+ data.tar.gz: 500afeca789a91b7f0644b2fa93d4882148fece885d83999214d240be026f7904ab28cc93bffa7ef26f6bcea0c5c70d5f317bfd53f9c6009318c3b383de3090d
data/.gitignore CHANGED
@@ -6,4 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- .idea
9
+ .idea
10
+ *.gem
@@ -1,3 +1,3 @@
1
1
  module GENOME
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
data/lib/genome.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'genome/version'
4
+ require 'open-uri'
4
5
 
5
6
  class ProviderError < StandardError
6
7
  def initialize(message = 'ProviderError')
@@ -55,12 +56,13 @@ module GENOME
55
56
  elsif _provider == 'ancestry'
56
57
  :ancestry_reader
57
58
  end
58
- File.open(_filename).each do |line|
59
- next if line.start_with?('#') || line.start_with?('rsid')
60
-
61
- rsid, snp = send reader, line
62
- genome[rsid] = snp
63
- end
59
+ open(_filename) {|f|
60
+ f.each_line do |line|
61
+ next if line.start_with?('#') || line.start_with?('rsid')
62
+ rsid, snp = send reader, line
63
+ genome[rsid] = snp
64
+ end
65
+ }
64
66
  genome
65
67
  end
66
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genome-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Lai