bio-polymarker_db_batch 0.2.1 → 0.3.0

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: f9b3076efa36fc6b89b3d296a559156e380d7f35
4
- data.tar.gz: 283bc9eca6cecc30ac54526f89484fad503dd247
3
+ metadata.gz: 36b22aa90692cd1619c083ae7d5e39ba0a0aca1b
4
+ data.tar.gz: cf32c6616329af6bd5001bac8cf7e199ab496181
5
5
  SHA512:
6
- metadata.gz: 2c5c9eb69c6e1af6dca1eda3e52939dfb4f2bc0ecf8bf299cd5ce9896296944333be8ee115c942bc87b4aa1c5949676113ef9a588f5491eeedd574ffa53d44b3
7
- data.tar.gz: 2da006400b5791ac677f384f33d0f84ee1404d9c8878516762dcacfc8359862519ae285cd9d51c1ebe9d65be4d56de3434d125e3ed7d73935132ecd453efb506
6
+ metadata.gz: e1b2134db74e3a5d938def8e705200a4380afe1ef4a6c6f4594d83c17bb7200ccaa48f55ae80778a35b669bd22e9d5bb39b934412e75518ae88410dc522000d9
7
+ data.tar.gz: 9c84edf81a7116aeeb55732cadbf08e143ee700bd335765ec251dbbd7cff3355b707b384b257db2c14a333f161f0710b9e68862ec8c00cdd3b79e55b377c24c1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.3.0
@@ -2,6 +2,7 @@
2
2
  require 'bioruby-polyploid-tools'
3
3
  require 'optparse'
4
4
  require 'mysql'
5
+
5
6
  $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
6
7
  $: << File.expand_path('.')
7
8
  path=File.expand_path(File.dirname(__FILE__) + '/../lib/bio-polymarker_db_batch.rb')
@@ -7,6 +7,6 @@
7
7
  # require 'bio/bio-plugin/plugin'
8
8
  #
9
9
  # In this file only require other files. Avoid other source code.
10
-
10
+ require 'net/smtp'
11
11
  require 'bio-polymarker_db_batch/polymarker_db_batch.rb'
12
12
 
@@ -28,7 +28,7 @@ class Bio::DB::Polymarker
28
28
  end
29
29
 
30
30
  def each_running
31
- query="SELECT snp_file_id, filename FROM snp_file WHERE status NOT IN ('NEW', 'DONE', 'LOADED');"
31
+ query="SELECT snp_file_id, filename FROM snp_file WHERE status = 'RUNNING');"
32
32
  ret = 0
33
33
  if block_given?
34
34
  ret = execute_query(query){|row| yield row }
@@ -39,7 +39,7 @@ class Bio::DB::Polymarker
39
39
  end
40
40
 
41
41
  def each_snp_in_file(file_id)
42
- query="SELECT name, chromosome, sequence FROM snp, snp_file_snp WHERE snp_file_snp.snpList_snpId = snp.snpId AND snp_file_snp.snp_file_snp_file_id = '#{file_id}';"
42
+ query="SELECT name, chromosome, sequence FROM snp, snp_file_snp WHERE snp_file_snp.snpList_snpId = snp.snpId AND snp_file_snp.snp_file_snp_file_id = '#{file_id}' AND snp.process = 1;"
43
43
  ret = 0
44
44
  puts query
45
45
  if block_given?
@@ -77,7 +77,8 @@ class Bio::DB::Polymarker
77
77
  pst.execute new_status, snp_file_id
78
78
  con.commit
79
79
  begin
80
- send_email(snp_file['email'],id, status)
80
+ hashed_id = "#{snp_file_id}:#{snp_file['hash']}"
81
+ send_email(snp_file['email'],hashed_id, new_status)
81
82
  rescue
82
83
  puts "Error sending email."
83
84
  end
@@ -95,7 +96,6 @@ The current status of your request (#{id}) is #{status}
95
96
  The latest status and results (when done) are available in: #{options['web_domain']}/status?id=#{id}
96
97
 
97
98
 
98
- #{opts[:body]}
99
99
  END_OF_MESSAGE
100
100
  smtp = Net::SMTP.new options["email_server"], 587
101
101
  smtp.enable_starttls
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-polymarker_db_batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo H. Ramirez-Gonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bio-polyploid-tools