genome-rb 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/genome/version.rb +1 -1
- data/lib/genome.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86ef45c34434fe55228b2b6afd8fb499daca3281e51667991dfb82ba289cc6cf
|
4
|
+
data.tar.gz: 687149cc4b7d296411950e0261b65f9905c3ccdafadfa8a5a3592cfc6d0b3371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d30436e144e010c21db260b6113cd1787f26f792ae625fe83e0311ffffd864b184d924d11fec1b1db1595f1cbdc48715a5f38d6f07daba8406a6ed3fc179b73
|
7
|
+
data.tar.gz: 9c5c6e45b893f144c9db30849fb2575684e91d228d6d4909789232fb48a05377f831ad2106eca54b03f4eeb4633ecc90d20d5f1059c31d259ef5247fb401ca31
|
data/lib/genome/version.rb
CHANGED
data/lib/genome.rb
CHANGED
@@ -38,13 +38,13 @@ module GENOME
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.load(_filename, _provider = '23andme')
|
41
|
-
raise ProviderError, "
|
41
|
+
raise ProviderError, "provider is not supported." unless %w[23andme ancestry].include? _provider
|
42
42
|
|
43
43
|
first_line = File.open(_filename, &:readline)
|
44
44
|
if _provider == '23andme'
|
45
|
-
raise FileTypeError, "
|
45
|
+
raise FileTypeError, "format is not correct" unless first_line.downcase.include? '23'.downcase
|
46
46
|
elsif _provider == 'ancestry'
|
47
|
-
raise FileTypeError, "
|
47
|
+
raise FileTypeError, "format is not correct" unless first_line.downcase.include? 'ancestry'.downcase
|
48
48
|
end
|
49
49
|
|
50
50
|
genome = Genome.new(name = _filename)
|
@@ -61,4 +61,4 @@ module GENOME
|
|
61
61
|
end
|
62
62
|
genome
|
63
63
|
end
|
64
|
-
end
|
64
|
+
end
|