seqtrimnext 2.0.36 → 2.0.38

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.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 2.0.38 2011-07-07
2
+
3
+ Optional Initial Stats generation in templates
4
+
5
+ === 2.0.37 2011-07-07
6
+
7
+ Added option to skip initial stats
8
+
1
9
  === 2.0.36 2011-06-24
2
10
 
3
11
  Added clustered installation documentation
data/bin/seqtrimnext CHANGED
@@ -205,6 +205,12 @@ optparse = OptionParser.new do |opts|
205
205
  opts.on( '-c', '--check_databases', 'Check Blast databases and reformat if necessary' ) do
206
206
  options[:check_db] = true
207
207
  end
208
+
209
+ # options[:skip_initial_stats] = false
210
+ # opts.on( '-k', '--skip_initial_stats', 'Skip initial stats' ) do
211
+ # options[:skip_initial_stats] = true
212
+ # end
213
+
208
214
 
209
215
  options[:install_db] = nil
210
216
  opts.on( '-i', '--install_databases TYPE', 'Install base databases and reformat them if necessary') do |db_type|
@@ -234,8 +240,9 @@ optparse = OptionParser.new do |opts|
234
240
 
235
241
 
236
242
  options[:list_db] = nil
237
- opts.on( '-L', '--list_db DB_NAME', 'List entries IDs in DB_NAME. Use "-L all" to view all available databases' ) do |value|
238
- options[:list_db] = value
243
+ opts.on( '-L', '--list_db [DB_NAME]', 'List entries IDs in DB_NAME. Use "-L all" to view all available databases' ) do |value|
244
+ options[:list_db] = true
245
+ options[:list_db_name] = value
239
246
  end
240
247
 
241
248
  options[:gen_params] = false
@@ -94,6 +94,9 @@ class Seqtrim
94
94
  default_value='true'
95
95
  params.check_param(errors,'remove_clonality','String',default_value,comment)
96
96
 
97
+ comment='Generate initial stats'
98
+ default_value='true'
99
+ params.check_param(errors,'generate_initial_stats','String',default_value,comment)
97
100
 
98
101
  comment='Minimum insert size for every trimmed sequence'
99
102
  default_value = 40
@@ -208,9 +211,14 @@ class Seqtrim
208
211
  Dir.mkdir(OUTPUT_PATH)
209
212
  end
210
213
 
211
- $LOG.info "Calculatings stats"
212
214
  # Extract global stats
213
- ExtractStats.new(sequence_reader,params)
215
+ if params.get_param('generate_initial_stats')=='true'
216
+ $LOG.info "Calculatings stats"
217
+
218
+ ExtractStats.new(sequence_reader,params)
219
+ else
220
+ $LOG.info "Skipping calculatings stats phase."
221
+ end
214
222
 
215
223
 
216
224
  # save used params to file
@@ -107,7 +107,7 @@ class PluginAdapters < Plugin
107
107
 
108
108
  actions=[]
109
109
  adapter_size=0
110
- @stats['adapter_size']={}
110
+ # @stats['adapter_size']={}
111
111
  adapters.each do |ad| # adds the correspondent action to the sequence
112
112
 
113
113
  type = get_type_adapter(ad.q_beg,ad.q_end,seq)
@@ -105,8 +105,8 @@ class PluginContaminants < Plugin
105
105
  contaminants_size=0
106
106
 
107
107
  # @stats[:contaminants_size]={}
108
- @stats['contaminants_size']={}
109
- @stats['rejected_seqs']={}
108
+ # @stats['contaminants_size']={}
109
+ # @stats['rejected_seqs']={}
110
110
 
111
111
  min_cont_size=@params.get_param('min_contam_seq_presence').to_i
112
112
 
@@ -28,8 +28,8 @@ class PluginLowHighSize < Plugin
28
28
  max_size = @params.get_param('max_sequence_size_raw').to_i #max_size is: mean + 2dev
29
29
  #add_stats('rejected_seqs',seq.seq_fasta.length)
30
30
  actions=[]
31
-
32
- if ((seq.seq_fasta.length>max_size) || (seq.seq_fasta.length<min_size)) #if length of sequence is out of (-2dev,2dev)
31
+
32
+ if ((max_size>0 && (seq.seq_fasta.length>max_size)) || (seq.seq_fasta.length<min_size)) #if length of sequence is out of (-2dev,2dev)
33
33
  $LOG.debug "#{seq.seq_name} rejected by size #{seq.seq_fasta.length} "
34
34
  type='ActionLowHighSize'
35
35
  # seq.add_action(0,seq.seq_fasta.length,type)
@@ -101,7 +101,7 @@ class PluginMids < Plugin
101
101
 
102
102
  mid_initial_pos=mid.q_beg-mid.s_beg
103
103
  has_full_key=false
104
- if @params.get_param('sequencing_key')
104
+ if !@params.get_param('sequencing_key').nil? && !@params.get_param('sequencing_key').empty?
105
105
  has_full_key = !seq.seq_fasta.index(@params.get_param('sequencing_key')).nil?
106
106
  end
107
107
 
data/lib/seqtrimnext.rb CHANGED
@@ -30,7 +30,7 @@ module Seqtrimnext
30
30
  # SEQTRIM_VERSION_STAGE = 'b'
31
31
  # SEQTRIM_VERSION = "2.0.0#{SEQTRIM_VERSION_STAGE}#{SEQTRIM_VERSION_REVISION}"
32
32
 
33
- VERSION = '2.0.36'
33
+ VERSION = '2.0.38'
34
34
 
35
35
  SEQTRIM_VERSION = VERSION
36
36
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: seqtrimnext
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.36
5
+ version: 2.0.38
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dario Guerrero & Almudena Bocinos
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-24 00:00:00 Z
13
+ date: 2011-07-07 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: narray