mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
added fix for parsing
This commit is contained in:
14
Gemfile.lock
14
Gemfile.lock
@@ -144,7 +144,7 @@ GEM
|
||||
guard (~> 2.1)
|
||||
guard-compat (~> 1.1)
|
||||
rspec (>= 2.99.0, < 4.0)
|
||||
hashdiff (0.2.3)
|
||||
hashdiff (0.3.0)
|
||||
highline (1.7.8)
|
||||
http-cookie (1.0.2)
|
||||
domain_name (~> 0.5)
|
||||
@@ -164,9 +164,9 @@ GEM
|
||||
sprockets (> 2, < 4)
|
||||
tilt
|
||||
libv8 (3.16.14.13)
|
||||
listen (3.0.5)
|
||||
listen (3.0.6)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
rb-inotify (>= 0.9.7)
|
||||
lograge (0.3.5)
|
||||
actionpack (>= 3)
|
||||
activesupport (>= 3)
|
||||
@@ -187,7 +187,7 @@ GEM
|
||||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.11.2)
|
||||
nenv (0.2.0)
|
||||
nenv (0.3.0)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-sftp (2.1.2)
|
||||
@@ -196,7 +196,7 @@ GEM
|
||||
net-ssh-gateway (1.2.0)
|
||||
net-ssh (>= 2.6.5)
|
||||
netrc (0.11.0)
|
||||
newrelic_rpm (3.14.2.312)
|
||||
newrelic_rpm (3.14.3.313)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
nokogumbo (1.4.7)
|
||||
@@ -205,7 +205,7 @@ GEM
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
oauth (0.4.7)
|
||||
paperclip (4.3.4)
|
||||
paperclip (4.3.5)
|
||||
activemodel (>= 3.2.0)
|
||||
activesupport (>= 3.2.0)
|
||||
cocaine (~> 0.5.5)
|
||||
@@ -259,7 +259,7 @@ GEM
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (10.5.0)
|
||||
rb-fsevent (0.9.7)
|
||||
rb-inotify (0.9.6)
|
||||
rb-inotify (0.9.7)
|
||||
ffi (>= 0.5.0)
|
||||
recaptcha (1.1.0)
|
||||
json
|
||||
|
||||
@@ -186,7 +186,7 @@ class Parsing
|
||||
"MT-T14783C" => "rs28357680"
|
||||
}
|
||||
rows.map do |row|
|
||||
snp_name, local_genotype = row.split("\t")
|
||||
snp_name, local_genotype = row.strip.split("\t")
|
||||
if snp_name.start_with?('MT')
|
||||
position = snp_name[/[0-9]+/]
|
||||
chromosome = 'MT'
|
||||
|
||||
@@ -44,36 +44,36 @@ class Preparsing
|
||||
|
||||
if genotype.filetype == "23andme"
|
||||
# first non-comment line is of length 4 after split
|
||||
if l.split("\t").length == 4
|
||||
if l.strip.split("\t").length == 4
|
||||
logger.info "file is 23andme and is ok!"
|
||||
file_is_ok = true
|
||||
end
|
||||
elsif genotype.filetype == "ancestry"
|
||||
# first line is of length 5
|
||||
if l.split("\t").length == 5
|
||||
if l.strip.split("\t").length == 5
|
||||
file_is_ok = true
|
||||
logger.info "file is ancestry and is ok!"
|
||||
end
|
||||
elsif genotype.filetype == "decodeme"
|
||||
# first line is of length 6
|
||||
if l.split(",").length == 6
|
||||
if l.strip.split(",").length == 6
|
||||
file_is_ok = true
|
||||
logger.info "file is decodeme and is ok!"
|
||||
end
|
||||
elsif genotype.filetype == "ftdna-illumina"
|
||||
# first line is of length 4
|
||||
if l.split(",").length == 4
|
||||
if l.strip.split(",").length == 4
|
||||
file_is_ok = true
|
||||
logger.info "file is ftdna and is ok!"
|
||||
end
|
||||
elsif genotype.filetype == "23andme-exome-vcf"
|
||||
#first line is
|
||||
if l.split("\t").length == 10
|
||||
#first line is
|
||||
if l.strip.split("\t").length == 10
|
||||
file_is_ok = true
|
||||
logger.info "file is 23andme-exome and is ok!"
|
||||
end
|
||||
elsif genotype.filetype == "IYG"
|
||||
if l.split("\t").length == 2
|
||||
if l.strip.split("\t").length == 2
|
||||
file_is_ok = true
|
||||
logger.info "file is IYG and is ok!"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user