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 +4 -4
- data/.gitignore +2 -1
- data/lib/genome/version.rb +1 -1
- data/lib/genome.rb +8 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe497996e7d2598a811469a808fa9998e0a6593
|
4
|
+
data.tar.gz: 8fe4e3d8de204dfa36f4c708c7b1b3906ad7886b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66210100b671742260a4aef410a825200fa31d9dace732fba1bad31c5f064538899e5f2e56084faeb3fccdcee16604e555c09c7140fc5654a7ef4fd98bca2835
|
7
|
+
data.tar.gz: 500afeca789a91b7f0644b2fa93d4882148fece885d83999214d240be026f7904ab28cc93bffa7ef26f6bcea0c5c70d5f317bfd53f9c6009318c3b383de3090d
|
data/.gitignore
CHANGED
data/lib/genome/version.rb
CHANGED
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
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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
|