full_lengther_next 0.6.2 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/{README.rdoc → README.md} +0 -0
  9. data/Rakefile +6 -37
  10. data/bin/console +14 -0
  11. data/bin/download_fln_dbs.rb +2 -7
  12. data/bin/full_lengther_next +85 -6
  13. data/bin/make_user_db.rb +13 -5
  14. data/bin/setup +8 -0
  15. data/full_lengther_next.gemspec +42 -0
  16. data/lib/full_lengther_next.rb +2 -10
  17. data/lib/full_lengther_next/artifacts.rb +74 -0
  18. data/lib/full_lengther_next/{classes/blast_functions.rb → blast_functions.rb} +0 -0
  19. data/lib/full_lengther_next/{classes/cdhit.rb → cdhit.rb} +0 -0
  20. data/lib/full_lengther_next/{classes/chimeric_seqs.rb → chimeric_seqs.rb} +0 -0
  21. data/lib/full_lengther_next/{classes/common_functions.rb → common_functions.rb} +0 -0
  22. data/lib/full_lengther_next/{classes/exonerate_result.rb → exonerate_result.rb} +0 -0
  23. data/lib/full_lengther_next/{classes/fl_analysis.rb → fl_analysis.rb} +0 -0
  24. data/lib/full_lengther_next/{classes/fl_string_utils.rb → fl_string_utils.rb} +0 -0
  25. data/lib/full_lengther_next/fln_stats.rb +613 -0
  26. data/lib/full_lengther_next/go_methods.rb +42 -0
  27. data/lib/full_lengther_next/{classes/handle_db.rb → handle_db.rb} +0 -0
  28. data/lib/full_lengther_next/mapping.rb +296 -0
  29. data/lib/full_lengther_next/{classes/my_worker.rb → my_worker.rb} +71 -9
  30. data/lib/full_lengther_next/{classes/my_worker_EST.rb → my_worker_EST.rb} +0 -0
  31. data/lib/full_lengther_next/{classes/my_worker_manager_EST.rb → my_worker_manager_EST.rb} +0 -0
  32. data/lib/full_lengther_next/{classes/my_worker_manager_fln.rb → my_worker_manager_fln.rb} +181 -16
  33. data/lib/full_lengther_next/{classes/nc_rna.rb → nc_rna.rb} +0 -0
  34. data/lib/full_lengther_next/{classes/orf.rb → orf.rb} +0 -0
  35. data/lib/full_lengther_next/{classes/reptrans.rb → reptrans.rb} +9 -5
  36. data/lib/full_lengther_next/{classes/sequence.rb → sequence.rb} +26 -1
  37. data/lib/full_lengther_next/{classes/test_code.rb → test_code.rb} +1 -1
  38. data/lib/full_lengther_next/{classes/types.rb → types.rb} +3 -2
  39. data/lib/full_lengther_next/{classes/une_los_hit.rb → une_los_hit.rb} +0 -0
  40. data/lib/full_lengther_next/version.rb +3 -0
  41. data/lib/full_lengther_next/{classes/warnings.rb → warnings.rb} +0 -0
  42. data/report_templates/general_summary.erb +140 -0
  43. data/report_templates/mapping_summary.erb +98 -0
  44. data/report_templates/reptrans_summary.erb +32 -0
  45. metadata +112 -134
  46. data/.gemtest +0 -0
  47. data/History.txt +0 -32
  48. data/Manifest.txt +0 -44
  49. data/PostInstall.txt +0 -6
  50. data/bin/plot_fln.rb +0 -270
  51. data/bin/plot_taxonomy.rb +0 -70
  52. data/lib/expresscanvas.zip +0 -0
  53. data/lib/full_lengther_next/classes/artifacts.rb +0 -66
  54. data/lib/full_lengther_next/classes/fln_stats.rb +0 -641
  55. data/script/console +0 -10
  56. data/script/destroy +0 -14
  57. data/script/generate +0 -14
  58. data/test/test_full_lengther_next.rb +0 -11
  59. data/test/test_helper.rb +0 -3
@@ -8,7 +8,78 @@ require 'reptrans'
8
8
 
9
9
  include FlnStats
10
10
 
11
-
11
+ module ScbiMapreduce
12
+ class WorkManager
13
+ def send_next_work
14
+ sleep = false
15
+ # if we need to exit, send quit to workers
16
+ if @@want_to_exit
17
+ send_object(:quit)
18
+
19
+ elsif !send_stuck_work
20
+
21
+ #send stuck work
22
+ objs=[]
23
+
24
+ t=Time.now_us
25
+
26
+ begin
27
+ # prepare new data
28
+ @@chunk_size.times do
29
+ obj=next_work
30
+ if obj.nil?
31
+ break
32
+ elsif obj == :sleep
33
+ #send_object(:sleep)
34
+ sleep = true
35
+ break
36
+ else
37
+ # add to obj array
38
+ objs << obj
39
+ end
40
+ end
41
+ rescue Exception => e
42
+ $SERVER_LOG.error("Exception creating next_work. Worker, quit!")
43
+ $SERVER_LOG.error("#{e.message}\n#{e.backtrace.join("\n")}")
44
+ send_object(:sleep)
45
+ self.class.global_error_received(e)
46
+
47
+ #raise e
48
+ end
49
+
50
+ @@total_read_time+=(Time.now_us - t)
51
+
52
+ # if new was data collected, send it
53
+ if objs.count>0
54
+ @@count += objs.count
55
+ @@chunk_count += 1
56
+
57
+ work_data=WorkManagerData.new(objs)
58
+ send_object(work_data)
59
+ @@sent_chunks+=1
60
+
61
+ # to keep order or retry failed job, we need job status
62
+ if @@keep_order || @@retry_stuck_jobs
63
+ # do not remove data to be able to sent it again
64
+ # work_data.data=nil
65
+ @@running_jobs.push work_data
66
+ # print_running_jobs
67
+ end
68
+ else
69
+ # otherwise,
70
+ if @@running_jobs.count >0 || sleep
71
+ $SERVER_LOG.info("Worker, go to sleep")
72
+ send_object(:sleep)
73
+
74
+ else
75
+ # send a quit value indicating no more data available
76
+ send_object(:quit)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
12
83
 
13
84
 
14
85
  class MyWorkerManagerFln < ScbiMapreduce::WorkManager
@@ -20,10 +91,17 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
20
91
  def self.init_work_manager(options)
21
92
  @@stats_hash = initialize_stats_hash
22
93
  @@stats_taxonomy = {}
94
+ @@stats_functional_annotation_by_seqs = {}
23
95
  @@stats_different_prot_id = []
24
96
  @@stats_different_prot_id_complete_seqs = []
97
+ @@pre_fln_seq_lengths = []
98
+ @@seq_lengths = []
99
+
100
+ @@map_object = {}
101
+
25
102
 
26
103
  @@options = options
104
+
27
105
  $verbose = options[:verbose]
28
106
 
29
107
  input_file = options[:fasta]
@@ -45,8 +123,8 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
45
123
  }
46
124
 
47
125
  @@functional_annotations = {}
48
- @@functional_annotations.merge!(load_functional_annotations(File.join(ENV['BLASTDB'], 'sp_'+options[:tax_group],'sp_'+options[:tax_group]+'.index')))
49
- #@@functional_annotations.merge!(load_functional_annotations(File.join(ENV['BLASTDB'], 'tr_'+options[:tax_group],'tr_'+options[:tax_group]+'.index'))) if options[:acess_db].include?('t')
126
+ @@functional_annotations.merge!(load_functional_annotations(File.join(ENV['BLASTDB'], 'sp_'+options[:tax_group],'sp_'+options[:tax_group]+'.index'))) if options[:acess_db].include?('s')
127
+ @@functional_annotations.merge!(load_functional_annotations(File.join(ENV['BLASTDB'], 'tr_'+options[:tax_group],'tr_'+options[:tax_group]+'.index'))) if options[:acess_db].include?('t')
50
128
 
51
129
  @@fasta_file = FastaQualFile.new(input_file,'')
52
130
  file_head = "Query_id\tfasta_length\tSubject_id\tdb_name\tStatus\te_value\tp_ident\ts_length\tprotein_length\tWarning_msgs\tframe\tORF_start\tORF_end\ts_start\ts_end\tDescription\tgo_id\tgo_description\tkegg_id\tinterpro_id\tinterpro_description\tec_id\tpfam_id\tpfam_description\tunipathway_id"
@@ -71,13 +149,24 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
71
149
  @@output_files['prot'] = File.open('fln_results/proteins.fasta', 'w') # FASTA
72
150
  @@output_files['nts'] = File.open("fln_results/nt_seq.txt", 'w')
73
151
  @@output_files['seqs'] = File.open('fln_results/unigenes.fasta', 'w') # FASTA
74
- @@output_files['stats_html'] = File.open('fln_results/summary_stats.html', 'w')
152
+ @@output_files['stats_html'] = 'fln_results/summary_stats.html'
75
153
  @@output_files['stats_txt'] = File.open('fln_results/summary_stats.txt', 'w')
76
154
 
77
155
  @@output_files[CODING].puts file_head
78
156
  @@output_files['db'].puts file_head
79
157
  @@output_files[NCRNA].puts file_head
80
-
158
+
159
+ if !options[:files2map].empty?
160
+ @@output_files['fpkm'] = File.open('fln_results/fpkm_per_transcript.txt', 'w')
161
+ @@output_files['coverage'] = File.open('fln_results/coverage_per_transcript.txt', 'w')
162
+ @@output_files['fpkm'].puts %w[Transcript_id fpkm Read_counts].join("\t")
163
+ @@output_files['coverage'].puts %w[seq_name mean_normalized_differences mean_max mean_coverage proportion_sequence_mapped].join("\t")
164
+ if options[:remove_unmapped]
165
+ @@output_files[UNMAPPED] = File.open('fln_results/unmapped.txt', 'w')
166
+ @@output_files[UNMAPPED].puts "Query_id\tfasta_length"
167
+ end
168
+ end
169
+
81
170
  #RepTrans module
82
171
  @@seqs_annotation_prot = []
83
172
  @@seqs_some_coding = []
@@ -87,6 +176,10 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
87
176
  @@complete_sure = []
88
177
  @@seqs_to_analyze = []
89
178
 
179
+ #Mapping_info
180
+ @@fpkm = {}
181
+ @@coverage_analysis = {}
182
+
90
183
  end
91
184
 
92
185
  #############################################################################################
@@ -96,9 +189,10 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
96
189
  # close files
97
190
  def self.end_work_manager
98
191
  orf_prediction_with_transdecoder if @@options[:acess_db].include?('p') && !@@complete_sure.empty? && !@@seqs_to_analyze.empty?
99
- write_summary_stats(@@stats_hash, @@stats_taxonomy, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs, @@output_files['stats_txt'], @@output_files['stats_html'])
192
+ write_summary_stats(@@stats_hash, @@stats_taxonomy, @@stats_functional_annotation_by_seqs, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs, @@pre_fln_seq_lengths, @@seq_lengths, @@output_files['stats_txt'], @@output_files['stats_html'])
193
+ write_mapping_report(@@fpkm, @@coverage_analysis, @@stats_functional_annotation_by_seqs)
100
194
  @@output_files.each do |key, handler|
101
- handler.close
195
+ handler.close if handler.class != String
102
196
  end
103
197
  end
104
198
 
@@ -109,17 +203,66 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
109
203
  # this method is called every time a worker needs new data to work. This method is executed many times like the chunk size says.
110
204
  # Return the work data or nil if no more data is available
111
205
  def next_work #Manage INput's worker
206
+ obj = nil
207
+ #send = 'None'
208
+ if !@@options[:files2map].empty? && !@@options[:ref_files].empty? #Mapping task
209
+ # send = 'Map'
210
+ obj = send_mapping_data
211
+ elsif !@@options[:files2map].empty? && @@options[:ref_files].empty? && @@map_object.length < @@options[:n_refs]
212
+ # send = 'Sleep'
213
+ obj = :sleep
214
+ else
215
+ # send = 'Fln'
216
+ obj = send_fln_data
217
+ end
218
+ #$LOG.info "Next_work: Sent => #{send}. ref_files.length = #{@@options[:ref_files].length}; n_refs = #{@@options[:n_refs]}; map_object.length = #{@@map_object.length}"
219
+ return obj
220
+ end
221
+
222
+ def send_mapping_data
223
+ return {mapping: @@options[:ref_files].shift}
224
+ end
225
+
226
+ def send_fln_data
227
+ obj = nil
112
228
  n,f,q = @@fasta_file.next_seq
113
229
  if !n.nil?
114
- @@stats_hash['input_seqs'] += 1
115
- return Sequence.new(n,f,q)
116
- else
117
- return nil
230
+ seq = Sequence.new(n,f,q)
231
+ begin
232
+
233
+ if !@@map_object.empty?
234
+ cov_analysis = @@map_object[n]
235
+ if cov_analysis.nil?
236
+ seq.fpkm = []
237
+ seq.coverage_analysis = []
238
+ else
239
+ seq.fpkm = cov_analysis.pop(2)
240
+ seq.coverage_analysis = cov_analysis
241
+ end
242
+ end
243
+ rescue Exception => e
244
+ puts e.message, e.backtrace.join("\n")
245
+ end
246
+
247
+ @@pre_fln_seq_lengths << f.length
248
+ sequence_stats(seq, @@stats_hash)
249
+ obj = {fln: seq}
118
250
  end
251
+ return obj
119
252
  end
120
253
 
121
254
  # this method is ejecuted each time an obj is finished
122
255
  def work_received(objs) #Manage OUTput's worker
256
+ task = objs.keys.first
257
+ data = objs.values.first
258
+ if task == :fln
259
+ receive_fln_data(data)
260
+ elsif task == :mapping
261
+ receive_mapping_data(data)
262
+ end
263
+ end
264
+
265
+ def receive_fln_data(objs)
123
266
  objs.each do |seq|
124
267
  transdecoder_keep_seq(seq)
125
268
  repTrans_keep_seq(seq)
@@ -127,13 +270,27 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
127
270
  get_taxonomy(seq.hit.definition, @@stats_taxonomy)
128
271
  get_functional_annotations(seq)
129
272
  end
273
+ @@fpkm[seq.seq_name] = seq.fpkm if !seq.fpkm.empty?
274
+ @@coverage_analysis[seq.seq_name] = seq.coverage_analysis if !seq.coverage_analysis.empty?
130
275
  write_seq(seq) if @@options[:acess_db].include?('c') || !@@options[:acess_db].include?('p') || ( seq.type != UNKNOWN && seq.type != CODING ) #Don't write Unknown or coding sequences when use transdecoder
131
276
  end
132
- @@stats_hash, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs = summary_stats(objs, @@stats_hash, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs)
133
- end
134
-
277
+ @@stats_hash, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs, @@seq_lengths = summary_stats(objs, @@stats_hash, @@stats_different_prot_id, @@stats_different_prot_id_complete_seqs, @@seq_lengths)
278
+ end
279
+
280
+ def receive_mapping_data(objs)
281
+ data = objs
282
+ @@map_object.merge!(data)
283
+ end
284
+
135
285
  def error_received(worker_error, obj)
136
- puts "WARNING!!!!!. CHUNK FAILED:Error while processing object #{obj.first.seq_name}\n" + worker_error.original_exception.message + ":\n" +worker_error.original_exception.backtrace.join("\n")
286
+ data = nil
287
+ sample = obj.first
288
+ if sample.class == Sequence
289
+ data = obj.seq_name
290
+ else
291
+ data = obj.inspect
292
+ end
293
+ puts "WARNING!!!!!. CHUNK FAILED:Error while processing object #{data}\n" + worker_error.original_exception.message + ":\n" +worker_error.original_exception.backtrace.join("\n")
137
294
  end
138
295
 
139
296
  def too_many_errors_received
@@ -167,6 +324,14 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
167
324
  @@func_annot_type.each do |type, position|
168
325
  annotations[type] = all_info[position]
169
326
  end
327
+ annotations[:go_description].split(";").each do |annot|
328
+ query = @@stats_functional_annotation_by_seqs[annot]
329
+ if query.nil?
330
+ @@stats_functional_annotation_by_seqs[annot] = [seq.seq_name]
331
+ else
332
+ query << seq.seq_name
333
+ end
334
+ end
170
335
  seq.functional_annotations = annotations
171
336
  end
172
337
  end
@@ -226,7 +391,7 @@ class MyWorkerManagerFln < ScbiMapreduce::WorkManager
226
391
  clusters_seqs_annot_prot = clustering_by_id(@@complete_sure)
227
392
  final_seqs = select_representative(clusters_seqs_annot_prot)
228
393
  coding_info = nil
229
- Dir.chdir('temp') do
394
+ Dir.chdir(@@options[:temp]) do
230
395
  orfs = get_seqs(final_seqs)
231
396
  File.open('training_set.fasta', 'w') {|f| f.write(orfs)}
232
397
  orfs = get_seqs(@@seqs_to_analyze)
@@ -186,13 +186,17 @@ def clustering_by_annot(seqs_with_hit, annotation_type)
186
186
  end
187
187
 
188
188
  def select_representative(clusters_seqs_annot_prot)
189
- seqs=[]
189
+ seqs = []
190
190
  clusters_seqs_annot_prot.each do |cluster|
191
- seq=cluster.select{|s| s.type == COMPLETE}.sort{|fl1, fl2| fl2.seq_fasta <=> fl1.seq_fasta}.first # Take longest full-length, s -> sequence, fl -> full-lentgh
191
+ if !cluster.first.coverage_analysis.empty? # filtering by mapping coverage
192
+ max_transcript_mean_coverage = cluster.map{|seq| seq.coverage_analysis[3] }.max - 0.05 # Relaxed limit of 5%
193
+ cluster.select!{|seq| seq.coverage_analysis[3] >= max_transcript_mean_coverage}
194
+ end
195
+ seq = cluster.select{|s| s.type == COMPLETE}.sort{|fl1, fl2| fl2.seq_fasta <=> fl1.seq_fasta}.first # Take longest full-length, s -> sequence, fl -> full-lentgh
192
196
  if seq.nil?
193
197
  cluster.sort!{|cl1, cl2| cl2.get_pident <=> cl1.get_pident}
194
- best_pident=cluster.first.get_pident
195
- seq=cluster.select{|s| s.get_pident == best_pident}.sort{|s1, s2| s2.seq_fasta <=> s1.seq_fasta}.first
198
+ best_pident = cluster.first.get_pident
199
+ seq = cluster.select{|s| s.get_pident == best_pident}.sort{|s1, s2| s2.seq_fasta <=> s1.seq_fasta}.first
196
200
  end
197
201
  seqs << seq
198
202
  end
@@ -207,4 +211,4 @@ def count_cpu(options)
207
211
  cpu = options[:workers]
208
212
  end
209
213
  return cpu
210
- end
214
+ end
@@ -5,7 +5,7 @@ require 'common_functions'
5
5
 
6
6
  class Sequence
7
7
 
8
- attr_accessor :seq_name, :seq_fasta, :fasta_length, :db_name, :seq_nt, :seq_aa, :db, :type, :status, :id, :orfs, :area_without_annotation, :save_fasta, :ignore, :hit, :t_code, :functional_annotations
8
+ attr_accessor :seq_name, :seq_fasta, :fasta_length, :db_name, :seq_nt, :seq_aa, :db, :type, :status, :id, :orfs, :area_without_annotation, :save_fasta, :ignore, :hit, :t_code, :functional_annotations, :fpkm, :coverage_analysis
9
9
 
10
10
  def initialize(seq_name, seq_fasta, seq_qual='')
11
11
  @seq_name = seq_name
@@ -22,6 +22,10 @@ class Sequence
22
22
  @annotations=[]
23
23
  @functional_annotations = {}
24
24
  @orfs=[]
25
+
26
+ #Mapping_info
27
+ @fpkm = []
28
+ @coverage_analysis = []
25
29
 
26
30
  @area_without_annotation=FALSE
27
31
  @save_fasta=TRUE
@@ -159,11 +163,21 @@ class Sequence
159
163
  if @save_fasta
160
164
  output_files['seqs'].puts get_fasta(@seq_fasta)
161
165
  end
166
+ if !@fpkm.empty?
167
+ output_files['fpkm'].puts "#{@seq_name}\t#{@fpkm.join("\t")}"
168
+ end
169
+ if !@coverage_analysis.empty?
170
+ all_coverages = @coverage_analysis.last
171
+ output_files['coverage'].puts "#{@seq_name}\t#{@coverage_analysis[0..@coverage_analysis.length-1].join("\t")}"
172
+ end
173
+
162
174
  case @type
163
175
  when OTHER
164
176
  write_other(output_files[@type])
165
177
  when CHIMERA
166
178
  write_chimera(output_files[@type])
179
+ when UNMAPPED
180
+ write_unmapped(output_files[@type])
167
181
  when MISASSEMBLED
168
182
  write_misassembled(output_files[@type])
169
183
  when UNKNOWN
@@ -193,6 +207,10 @@ class Sequence
193
207
  file.puts "#{@seq_name}\t#{@fasta_length}\t#{@hit.acc}\t#{@db_name}\t#{all_warns}"
194
208
  end
195
209
 
210
+ def write_unmapped(file)
211
+ file.puts "#{@seq_name}\t#{@fasta_length}"
212
+ end
213
+
196
214
  def write_chimera(file) #TODO : write 'SOLVED' tag
197
215
  @hit.each do |h|
198
216
  file.puts "#{@seq_name}\t#{@fasta_length}\t#{h.acc}\t#{@db_name}\t#{h.q_frame}\t#{h.e_val}\t#{h.ident}\t#{h.q_beg + 1}\t#{h.q_end + 1}\t#{h.s_beg + 1}\t#{h.s_end + 1}\t#{h.definition}"
@@ -268,6 +286,8 @@ class Sequence
268
286
  type_description = 'Failed'
269
287
  when OTHER
270
288
  type_description = 'Other'
289
+ when UNMAPPED
290
+ type_description = 'Unmapped'
271
291
  when CHIMERA
272
292
  type_description = 'Chimera'
273
293
  when MISASSEMBLED
@@ -469,4 +489,9 @@ class Sequence
469
489
  array_annotations.map{|annotation| @annotations << annotation.dup}
470
490
  end
471
491
 
492
+ def unmapped?
493
+ res = FALSE
494
+ res = TRUE if !@coverage_analysis.empty? && @coverage_analysis[3] == 0 #3 => percentage of sequence covered by reads
495
+ return res
496
+ end
472
497
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  require 'common_functions'
3
- require 'scbi_plot'
3
+ #require 'scbi_plot'
4
4
 
5
5
  include CommonFunctions
6
6
 
@@ -1,5 +1,6 @@
1
- FAILED = -4
2
- OTHER = -3
1
+ FAILED = -5
2
+ OTHER = -4
3
+ UNMAPPED = -3
3
4
  CHIMERA = -2
4
5
  MISASSEMBLED = -1
5
6
  UNKNOWN = 0
@@ -0,0 +1,3 @@
1
+ module FullLengtherNext
2
+ VERSION = '0.9.8'
3
+ end
@@ -0,0 +1,140 @@
1
+ <% base_table_config = {
2
+ header: true,
3
+ border: 2,
4
+ attrib: {
5
+ 'cellspacing' => 0,
6
+ 'cellpadding' => 2
7
+ }
8
+ }
9
+ base_pie_config = {
10
+ header: true,
11
+ width: '650px',
12
+ height: '650px',
13
+ responsive: false,
14
+ title: nil,
15
+ config: {
16
+ 'fontName' => 'Arial',
17
+ 'showPieValues' => false,
18
+ 'pieSegmentPrecision' => 3,
19
+ 'maxPieSectors' => 30,
20
+ 'legendBox' => false,
21
+ 'legendScaleFontFactor' => 0.9
22
+ }
23
+ }
24
+ %>
25
+ <center>
26
+ <div style="float: center; font-size: 30; margin:10px">
27
+ <b>Full-LengtherNEXT Summary</b>
28
+ </div>
29
+ <div style="overflow: hidden; width: 1024px; height: 650px; padding: 10">
30
+ <div style="margin: 0; float: left; width: 400px; height: 600px;">
31
+ <%= table_title('General info') %>
32
+ <%= table(base_table_config.merge({
33
+ id: :general_report,
34
+ cell_align: ['left', 'right', 'right']
35
+ }
36
+ ))
37
+ %>
38
+ </div>
39
+ <div style="margin: 0; float:rigth">
40
+ <%= table_title('Report guiding assembly quality') %>
41
+ <%= table(base_table_config.merge({
42
+ id: :assembly_report,
43
+ cell_align: ['left', 'right', 'right']
44
+ }
45
+ ))
46
+ %>
47
+ <sup>1</sup> Percents for subclassifications of this category <br> were calculated using this line as 100% reference.
48
+ </div>
49
+ </div>
50
+ <div style="overflow: hidden; width: 1024px; height: 660px; padding: 10">
51
+ <div style="margin: 0; float:left">
52
+ <%= table_title('Structural profile') %>
53
+ <%= stacked(
54
+ id: :structural_data,
55
+ header: true,
56
+ title: nil,
57
+ x_label: '% sequences',
58
+ width: '540px',
59
+ config: {
60
+ 'graphOrientation' => 'vertical',
61
+ 'fontName' => 'Arial',
62
+ 'setMaxX' => 80,
63
+ 'setMinX' => 0,
64
+ 'smpLabelScaleFontFactor' => 1.2,
65
+ 'axisTitleScaleFontFactor' => 2,
66
+ 'xAxis2Show' => false,
67
+ 'xAxisExact' => true
68
+ })%>
69
+ </div>
70
+ <div style="margin: 0; float: rigth">
71
+ <%= table_title('Status report') %>
72
+ <%= table(base_table_config.merge({
73
+ id: :status_report,
74
+ cell_align: ['left', 'left', 'right', 'right']
75
+ }
76
+ ))
77
+ %>
78
+ </div>
79
+ </div>
80
+ <div style="overflow: hidden; width: 1024px; height: 800px; padding: 10">
81
+ <div style="margin: 0; float: left">
82
+ <%= table_title('Taxonomy distribution on annotations') %>
83
+ <%= barplot(
84
+ id: :taxonomy,
85
+ header: true,
86
+ width: '600px',
87
+ title: nil,
88
+ x_label: 'Number of sequences',
89
+ config: {
90
+ 'fontName' => 'Arial',
91
+ 'axisTitleScaleFontFactor' => 1.5,
92
+ 'showLegend' => false,
93
+ 'smpLabelScaleFontFactor' => 1
94
+ })%>
95
+ </div>
96
+ <div style="margin: 0; float: rigth">
97
+ <%= table_title('Database usage') %>
98
+ <%= table(base_table_config.merge({
99
+ id: :database_report,
100
+ cell_align: ['left', 'right', 'right']
101
+ }
102
+ ))
103
+ %>
104
+ </div>
105
+ </div>
106
+ <div style="overflow: hidden; width: 1320px; padding: 10">
107
+ <div style="margin: 0; float: left">
108
+ <%= table_title('GO: Molecular function') %>
109
+ <%= pie(base_pie_config.merge({
110
+ id: :function_go,
111
+ row_names: true,
112
+ header: true
113
+ }
114
+ ))
115
+ %>
116
+ </div>
117
+ <div style="margin: 0; float: rigth">
118
+ <%= table_title('GO: Biological process') %>
119
+ <%= pie(base_pie_config.merge({
120
+ id: :process_go,
121
+ row_names: true,
122
+ header: true
123
+ }
124
+ ))
125
+ %>
126
+ </div>
127
+ </div>
128
+ <div style="overflow: hidden; width: 1320px; padding: 10">
129
+ <div style="margin: 0; float: left">
130
+ <%= table_title('GO: Cellular component') %>
131
+ <%= pie(base_pie_config.merge({
132
+ id: :component_go,
133
+ row_names: true,
134
+ header: true
135
+ }
136
+ ))
137
+ %>
138
+ </div>
139
+ </div>
140
+ </center>