seqtrimnext 2.0.52 → 2.0.54

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,12 @@
1
+ === 2.0.54 2012-09-07
2
+
3
+ Write fastq as fastq.gz
4
+
5
+ === 2.0.53 2012-07-24
6
+
7
+ * Added illumina adapters
8
+ * Gzipped fastq files can be used with SeqtrimNext
9
+
1
10
  === 2.0.52 2012-06-26
2
11
 
3
12
  * Added new plugin for user contaminants.
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ $hoe = Hoe.spec 'seqtrimnext' do
24
24
  self.extra_deps << ['scbi_blast','>=0.0.34']
25
25
  self.extra_deps << ['scbi_mapreduce','>=0.0.38']
26
26
  self.extra_deps << ['scbi_fasta','>=0.1.7']
27
- self.extra_deps << ['scbi_fastq','>=0.0.16']
27
+ self.extra_deps << ['scbi_fastq','>=0.0.17']
28
28
  self.extra_deps << ['scbi_plot','>=0.0.6']
29
29
  self.extra_deps << ['scbi_math','>=0.0.1']
30
30
  self.extra_deps << ['scbi_headers','>=0.0.2']
data/bin/seqtrimnext CHANGED
@@ -322,6 +322,11 @@ optparse = OptionParser.new do |opts|
322
322
  options[:skip_report] = true
323
323
  end
324
324
 
325
+ options[:write_in_gzip] = false
326
+ opts.on( '-z', '--gzip', 'Generate output files in gzip format.' ) do
327
+ options[:write_in_gzip] = true
328
+ end
329
+
325
330
  # This displays the help screen, all programs are
326
331
  # assumed to have this option.
327
332
  opts.on_tail( '-h', '--help', 'Display this screen' ) do
@@ -13,7 +13,7 @@ STATS_PATH=File.join(OUTPUT_PATH,'stats.json')
13
13
 
14
14
  class SeqtrimWorkManager < ScbiMapreduce::WorkManager
15
15
 
16
- def self.init_work_manager(sequence_readers, params, chunk_size = 100, use_json=false, skip_output=false)
16
+ def self.init_work_manager(sequence_readers, params, chunk_size = 100, use_json=false, skip_output=false, write_in_gzip=true)
17
17
  @@full_stats={}
18
18
  @@params= params
19
19
  @@exit = false
@@ -24,6 +24,7 @@ class SeqtrimWorkManager < ScbiMapreduce::WorkManager
24
24
  @@ongoing_stats[:biggest_sequence_size] = 0
25
25
 
26
26
  @@skip_output=skip_output
27
+ @@write_in_gzip=write_in_gzip
27
28
 
28
29
  @@chunk_size = chunk_size
29
30
 
@@ -336,7 +337,12 @@ class SeqtrimWorkManager < ScbiMapreduce::WorkManager
336
337
  end
337
338
 
338
339
  # open file
339
- res_file=File.open(file_name,@@open_mode)
340
+ if @@write_in_gzip && file_name.upcase.index('.FASTQ')
341
+ file=File.open(file_name+'.gz',@@open_mode)
342
+ res_file=Zlib::GzipWriter.new(file)
343
+ else
344
+ res_file=File.open(file_name,@@open_mode)
345
+ end
340
346
 
341
347
  # save it in hash for next use
342
348
  @@files[file_name]=res_file
@@ -326,7 +326,7 @@ class Seqtrim
326
326
  else
327
327
  $LOG.info 'Starting server'
328
328
 
329
- SeqtrimWorkManager.init_work_manager(sequence_readers, params,chunk_size,use_json,options[:skip_output])
329
+ SeqtrimWorkManager.init_work_manager(sequence_readers, params,chunk_size,use_json,options[:skip_output],options[:write_in_gzip])
330
330
 
331
331
  begin
332
332
  cpus=1
@@ -56,7 +56,9 @@ class PluginContaminants < Plugin
56
56
 
57
57
  def exec_seq(seq,blast_query)
58
58
 
59
- if seq.get_actions(ActionUserContaminant)
59
+ user_conts=seq.get_actions(ActionUserContaminant)
60
+
61
+ if (!user_conts.nil?) && (!user_conts.empty?)
60
62
  return
61
63
  end
62
64
 
@@ -151,7 +151,6 @@ class PluginIndeterminations < Plugin
151
151
 
152
152
  if !match.nil?
153
153
  found=match[0].length
154
-
155
154
 
156
155
  a = seq.new_action(seq.seq_fasta.length-found,seq.seq_fasta.length,'ActionIndetermination')
157
156
  a.right_action=true
@@ -7,7 +7,7 @@
7
7
 
8
8
  # Help: <ul>
9
9
  # Help: <li>PluginIndeterminations: retaining the longest sequence fragment without indeterminations (N)</li>
10
-
10
+ # Help: <li>PluginAbAdapters: trimming the Illumina adapters</li>
11
11
  # Help: <li>PluginUserContaminants: discarding sequences matching any entry in the user contaminant database saving them in a separate file</li>
12
12
 
13
13
  # Help: <li>PluginContaminants: trimming the contaminant fragments found in the contaminant database. When contamination is prevalent, sequences are rejected. </li>
@@ -15,7 +15,7 @@
15
15
  # Help: <li>PluginLowQuality: trimming low quality regions from sequences. </li>
16
16
  # Help: </ul>
17
17
 
18
- plugin_list = PluginIndeterminations,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality
18
+ plugin_list = PluginIndeterminations,PluginAbAdapters,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality
19
19
 
20
20
  generate_initial_stats = false
21
21
 
@@ -30,3 +30,4 @@ min_insert_size_paired=40
30
30
  # do not remove cloned sequences
31
31
  remove_clonality=false
32
32
 
33
+ adapters_ab_db="adapters_illumina.fasta"
@@ -7,7 +7,7 @@
7
7
 
8
8
  # Help: <ul>
9
9
  # Help: <li>PluginIndeterminations: retaining the longest sequence fragment without indeterminations (N)</li>
10
-
10
+ # Help: <li>PluginAbAdapters: trimming the Illumina adapters</li>
11
11
  # Help: <li>PluginUserContaminants: discarding sequences matching any entry in the user contaminant database saving them in a separate file</li>
12
12
 
13
13
  # Help: <li>PluginContaminants: trimming the contaminant fragments found in the contaminant database. When contamination is prevalent, sequences are rejected. </li>
@@ -16,7 +16,7 @@
16
16
  # Help: <li>PluginLowComplexity: sequences with low complexity are stored on a separate file. </li>
17
17
  # Help: </ul>
18
18
 
19
- plugin_list = PluginIndeterminations,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality,PluginLowComplexity
19
+ plugin_list = PluginIndeterminations,PluginAbAdapters,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality,PluginLowComplexity
20
20
 
21
21
  generate_initial_stats = false
22
22
 
@@ -28,3 +28,4 @@ min_insert_size_trimmed = 30
28
28
  # do not remove cloned sequences
29
29
  remove_clonality=false
30
30
 
31
+ adapters_ab_db="adapters_illumina.fasta"
@@ -19,7 +19,5 @@
19
19
 
20
20
  plugin_list = PluginIndeterminations,PluginAdapters,PluginFindPolyAt,PluginContaminants,PluginVectors,PluginLowQuality
21
21
 
22
-
23
22
  # do not remove cloned sequences
24
23
  remove_clonality=false
25
-
@@ -27,4 +27,4 @@ contaminants_db="contaminants.fasta cont_ribosome.fasta cont_mitochondrias.fasta
27
27
 
28
28
 
29
29
  # do not remove cloned sequences
30
- remove_clonality=false
30
+ remove_clonality=true
@@ -8,7 +8,7 @@
8
8
  # Help: <ul>
9
9
  # Help: <li>PluginIndeterminations: retaining the longest sequence fragment without indeterminations (N)</li>
10
10
  # Help: <li>PluginFindPolyAt: trimming PolyA and PolyT. After a PolyT, the sequence is checked for low complexity. </li>
11
-
11
+ # Help: <li>PluginAbAdapters: trimming the Illumina adapters</li>
12
12
  # Help: <li>PluginUserContaminants: discarding sequences matching any entry in the user contaminant database saving them in a separate file</li>
13
13
 
14
14
  # Help: <li>PluginContaminants: trimming the contaminant fragments found in the contaminant database. When contamination is prevalent, sequences are rejected. </li>
@@ -17,7 +17,7 @@
17
17
  # Help: <li>PluginLowComplexity: sequences with low complexity are stored on a separate file. </li>
18
18
  # Help: </ul>
19
19
 
20
- plugin_list = PluginIndeterminations,PluginFindPolyAt,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality,PluginLowComplexity
20
+ plugin_list = PluginIndeterminations,PluginFindPolyAt,PluginAbAdapters,PluginUserContaminants,PluginContaminants,PluginVectors,PluginLowQuality,PluginLowComplexity
21
21
 
22
22
  contaminants_db="contaminants.fasta cont_ribosome.fasta"
23
23
 
@@ -29,3 +29,5 @@ min_insert_size_trimmed = 30
29
29
 
30
30
  # do not remove cloned sequences
31
31
  remove_clonality=false
32
+
33
+ adapters_ab_db="adapters_illumina.fasta"
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.52'
33
+ VERSION = '2.0.54'
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.52
5
+ version: 2.0.54
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: 2012-07-16 00:00:00 Z
13
+ date: 2012-09-07 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: narray
@@ -97,7 +97,7 @@ dependencies:
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- version: 0.0.16
100
+ version: 0.0.17
101
101
  type: :runtime
102
102
  version_requirements: *id008
103
103
  - !ruby/object:Gem::Dependency