seqtrimnext_report 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c42cf93e60bfc81a51b415541d88f9a4ffd13213
4
+ data.tar.gz: 8a0719b08465f02570155488f32d8c92f10b947e
5
+ SHA512:
6
+ metadata.gz: 969f6bdcde2eb8e932532e35193f84260567113aaad17ac5476a877437af66cfe5e4b98d58d99caa4e6e4a5bcddb41ba3a93b469b351ac9e562b4ad5cd7812b0
7
+ data.tar.gz: aaf73a28e860db09598eb353fbcdd513b1b88726ae2ade0fd7a6e9ba62a4196fa3ae59e35e9650877dd14174bbd5e1c24da1f73e6ee56e4a72a0cc88ee81ec1c
@@ -1,3 +1,11 @@
1
+ === 0.0.7 2013-07-19
2
+
3
+ Fix to work with incomplete initial stats
4
+
5
+ === 0.0.6 2012-12-05
6
+
7
+ Fix not found Initial stats for illumina
8
+
1
9
  === 0.0.5 2012-03-01
2
10
 
3
11
  Fixed bug with report generation
@@ -39,6 +39,23 @@ def get_json_data(file)
39
39
  return data
40
40
  end
41
41
 
42
+ def fix_initial_stats(initial_stats)
43
+
44
+ initial_stats['sequence_count']=0 if initial_stats['sequence_count'].nil?
45
+ initial_stats['smallest_sequence_size']=0 if initial_stats['smallest_sequence_size'].nil?
46
+ initial_stats['biggest_sequence_size']=0 if initial_stats['biggest_sequence_size'].nil?
47
+ initial_stats['min_sequence_size_raw']=0 if initial_stats['min_sequence_size_raw'].nil?
48
+ initial_stats['max_sequence_size_raw']=0 if initial_stats['max_sequence_size_raw'].nil?
49
+ initial_stats['coefficient_of_variance']=0 if initial_stats['coefficient_of_variance'].nil?
50
+ initial_stats['nucleotide_count']=0 if initial_stats['nucleotide_count'].nil?
51
+ initial_stats['mode_of_sizes']=0 if initial_stats['mode_of_sizes'].nil?
52
+ initial_stats['mean_of_sequence_sizes']=0 if initial_stats['mean_of_sequence_sizes'].nil?
53
+ initial_stats['qv']=[] if initial_stats['qv'].nil?
54
+ initial_stats['used_key']='XXXX' if initial_stats['used_key'].nil?
55
+ initial_stats['all_keys']={'XXXX'=>0} if initial_stats['all_keys'].nil?
56
+
57
+ end
58
+
42
59
  if ARGV.count!=1
43
60
  puts "Usage: #{File.basename($0)} output_files_folder"
44
61
  exit(-1)
@@ -52,12 +69,37 @@ if !Dir.exists?(output_files)
52
69
  exit(-1)
53
70
  end
54
71
 
72
+
73
+
55
74
  if !File.exist?(File.join(output_files,'used_params.txt'))
56
75
  puts "used_params.txt file not found.\n"
57
76
  exit(-1)
58
77
  elsif !File.exist?(File.join(output_files,'initial_stats.json'))
59
- puts "initial_stats.json file not found.\n"
60
- exit(-1)
78
+ puts "initial_stats.json file not found. Using an empty file\n"
79
+
80
+ f=File.open(File.join(output_files,'initial_stats.json'),'w')
81
+
82
+ s='{
83
+ "sequence_count": 0,
84
+ "smallest_sequence_size": 0,
85
+ "biggest_sequence_size": 0,
86
+ "min_sequence_size_raw": 0,
87
+ "max_sequence_size_raw": 0,
88
+ "coefficient_of_variance": 0,
89
+ "nucleotide_count": 0,
90
+ "mode_of_sizes": 0,
91
+ "mean_of_sequence_sizes": 0,
92
+ "qv": [],
93
+ "used_key": "XXXX",
94
+ "all_keys": {
95
+ "XXXX": 0
96
+ }
97
+ }'
98
+
99
+ f.puts(s)
100
+ f.close
101
+
102
+ # exit(-1)
61
103
  elsif !File.exist?(File.join(output_files,'stats.json'))
62
104
  puts "stats.json file not found.\n"
63
105
  exit(-1)
@@ -76,6 +118,8 @@ begin
76
118
 
77
119
  # load initial and final stats
78
120
  initial_stats = get_json_data(File.join(output_files,'initial_stats.json'))
121
+ fix_initial_stats(initial_stats)
122
+
79
123
  stats = get_json_data(File.join(output_files,'stats.json'))
80
124
 
81
125
  if (initial_stats.nil?)
@@ -8,5 +8,5 @@ ROOT_PATH=File.join(File.dirname(__FILE__),'seqtrimnext_report')
8
8
  $: << File.expand_path(File.join(ROOT_PATH, 'classes'))
9
9
 
10
10
  module SeqtrimnextReport
11
- VERSION = '0.0.5'
11
+ VERSION = '0.0.7'
12
12
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seqtrimnext_report
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.5
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Noe Fernandez & Dario Guerrero
@@ -10,13 +9,12 @@ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
11
 
13
- date: 2012-03-01 00:00:00 Z
12
+ date: 2013-07-19 00:00:00 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: seqtrimnext
17
16
  prerelease: false
18
17
  requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
19
  - - ">="
22
20
  - !ruby/object:Gem::Version
@@ -27,7 +25,6 @@ dependencies:
27
25
  name: hoe
28
26
  prerelease: false
29
27
  requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
28
  requirements:
32
29
  - - ">="
33
30
  - !ruby/object:Gem::Version
@@ -73,6 +70,8 @@ files:
73
70
  homepage: http://www.scbi.uma.es/downloads
74
71
  licenses: []
75
72
 
73
+ metadata: {}
74
+
76
75
  post_install_message: PostInstall.txt
77
76
  rdoc_options:
78
77
  - --main
@@ -80,23 +79,20 @@ rdoc_options:
80
79
  require_paths:
81
80
  - lib
82
81
  required_ruby_version: !ruby/object:Gem::Requirement
83
- none: false
84
82
  requirements:
85
- - - ">="
83
+ - &id003
84
+ - ">="
86
85
  - !ruby/object:Gem::Version
87
86
  version: "0"
88
87
  required_rubygems_version: !ruby/object:Gem::Requirement
89
- none: false
90
88
  requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: "0"
89
+ - *id003
94
90
  requirements: []
95
91
 
96
92
  rubyforge_project: seqtrimnext_report
97
- rubygems_version: 1.7.2
93
+ rubygems_version: 2.0.3
98
94
  signing_key:
99
- specification_version: 3
95
+ specification_version: 4
100
96
  summary: A PDF report generator for SeqtrimNEXT preprocessing software from SCBI.
101
97
  test_files:
102
98
  - test/test_helper.rb