mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
For some reason, rails c didn't work anymore due to minitest missing - which we never used - added to gemfile. Added some more debugging-info to preparsing-job.
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -11,6 +11,8 @@ gem 'fitgem'
|
||||
|
||||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
gem "turn", "< 0.8.3"
|
||||
gem "minitest"
|
||||
|
||||
# gem 'sqlite3'
|
||||
# use postgresql instead:
|
||||
|
||||
@@ -51,6 +51,7 @@ GEM
|
||||
activemodel (= 3.0.10)
|
||||
activesupport (= 3.0.10)
|
||||
activesupport (3.0.10)
|
||||
ansi (1.4.3)
|
||||
archive-tar-minitar (0.5.2)
|
||||
arel (2.0.10)
|
||||
authlogic (3.1.3)
|
||||
@@ -85,6 +86,7 @@ GEM
|
||||
rest-client (>= 1.3.0)
|
||||
metaclass (0.0.1)
|
||||
mime-types (1.19)
|
||||
minitest (3.3.0)
|
||||
mocha (0.12.3)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.3.6)
|
||||
@@ -167,6 +169,8 @@ GEM
|
||||
treetop (1.4.10)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
turn (0.8.2)
|
||||
ansi (>= 1.2.2)
|
||||
tzinfo (0.3.33)
|
||||
vegas (0.1.11)
|
||||
rack (>= 1.0.0)
|
||||
@@ -186,6 +190,7 @@ DEPENDENCIES
|
||||
jquery-rails
|
||||
json
|
||||
mediawiki-gateway
|
||||
minitest
|
||||
mocha
|
||||
nested_form!
|
||||
paperclip (~> 2.4)
|
||||
@@ -201,5 +206,6 @@ DEPENDENCIES
|
||||
shoulda-matchers
|
||||
sunspot_rails (~> 1.2.1)
|
||||
sunspot_test
|
||||
turn (< 0.8.3)
|
||||
vegas
|
||||
will_paginate (= 3.0.pre2)
|
||||
|
||||
@@ -61,7 +61,7 @@ class GenotypesController < ApplicationController
|
||||
|
||||
@genotype.move_file
|
||||
Resque.enqueue(Preparsing, @genotype.id)
|
||||
format.html { redirect_to(current_user, :notice => 'Genotype was successfully uploaded! Parsing and stuff might take a couple of hours.') }
|
||||
format.html { redirect_to(current_user, :notice => 'Genotype was successfully uploaded! Parsing and annotating might take a couple of hours.') }
|
||||
format.xml { render :xml => current_user, :status => :created, :location => @user }
|
||||
else
|
||||
format.html { render :action => "new" }
|
||||
|
||||
@@ -75,23 +75,27 @@ class Preparsing
|
||||
if @genotype.filetype == "23andme"
|
||||
# first non-comment line is of length 4 after split
|
||||
if l.split("\t").length == 4
|
||||
puts "file is 23andme and is ok!"
|
||||
file_is_ok = true
|
||||
end
|
||||
elsif @genotype.filetype == "decodeme"
|
||||
# first line is of length 6
|
||||
if l.split(",").length == 6
|
||||
file_is_ok = true
|
||||
puts "file is decodeme and is ok!"
|
||||
end
|
||||
elsif @genotype.filetype == "ftdna-illumina"
|
||||
# first line is of length 4
|
||||
if l.split(",").length == 4
|
||||
file_is_ok = true
|
||||
puts "file is ftdna and is ok!"
|
||||
end
|
||||
end
|
||||
|
||||
# not proper file!
|
||||
if not file_is_ok
|
||||
UserMailer.parsing_error(@genotype.user_id).deliver
|
||||
puts "file is not ok, sending email"
|
||||
# should delete the uploaded file here, leaving that for now
|
||||
# might be better to keep the file for debugging
|
||||
else
|
||||
|
||||
@@ -9,35 +9,27 @@
|
||||
<%= f.file_field :filename %>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="input">
|
||||
<%= f.label :filetype %>
|
||||
</div>
|
||||
<div class="input">
|
||||
<ul class="inputs-list">
|
||||
<li>
|
||||
<label>
|
||||
<%= f.radio_button :filetype,"23andme" %>
|
||||
<span>23andme-format</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<%= f.radio_button :filetype,"decodeme"%>
|
||||
<span>deCODEme-format</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<%= f.radio_button :filetype,"ftdna-illumina"%>
|
||||
<span>FamilyTreeDNA, Illumina-Format</span>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<%= f.radio_button :filetype,"23andme-exome-vcf"%>
|
||||
<span>23andMe-EXOME, VCF-format (unzipped)</span>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
<br/>Not sure which type to choose? Take a look at our <%=link_to("FAQ","/faq#filetypes")%>
|
||||
<br/>Not sure which type to choose? Take a look at our <%=link_to("FAQ","/faq#filetypes")%><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
|
||||
Reference in New Issue
Block a user