seqtrimnext 2.0.60 → 2.0.61

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: a3858c7d16c231f2bd9a8a20a79e71793fa4a26b
4
- data.tar.gz: 8737fb4a873639ccf4784fa0b0f4add4778df20f
3
+ metadata.gz: 0ccbee45f33fe72b0b26f542ec15a54e16e91090
4
+ data.tar.gz: d3637c75263534e59c4a4fc3f2175b15eb7745ac
5
5
  SHA512:
6
- metadata.gz: 8885fc85c63703652371ecc1a4bc67670de700b8151ba0cf3e3e706904b979a4eeb777b289c2553b229832a556887572c0c8760978f7f6306b099a085a850ab1
7
- data.tar.gz: a9c3c18e94a240720afd44840ba297259ec888c28381ec4855eec68b38dba3387b76df33c5211b2a91f9fec5d23e03645b792ae4fa71e8c82ea36dfc965e2e1e
6
+ metadata.gz: b76e76001e951d7e1d104e59dd20042cd50274ed313e8531620962a639c8f294cdd9eb7c558f4e79a336a9f58d1d87e5357c21c4ddb2129cdb4d5048ff7a97ce
7
+ data.tar.gz: e19042628ff07b65c4fd08c11b719175e1656a343d10e7811a434fbd8d6923f2a2b0060f8c74fec894e2a09e82d7a35fcad4b4aa074e63516d399c163554163c
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'json'
4
+
5
+ if ARGV.count<1
6
+ puts "Usage: #{$0} [-t] [-j] stats1.json"
7
+ exit -1
8
+ end
9
+
10
+ # print header
11
+ if ARGV[0]=='-t'
12
+ heads=['Plugin name','execution_time (s)']
13
+ puts heads.join("\t")
14
+ ARGV.shift
15
+ end
16
+
17
+ puts_json=false
18
+ if ARGV[0]=='-j'
19
+ puts_json=true
20
+ ARGV.shift
21
+ end
22
+
23
+
24
+ ARGV.each do |file_path|
25
+ sample_name = File.basename(File.expand_path(File.join(file_path,'..','..')))
26
+
27
+ stats=JSON::parse(File.read(file_path))
28
+
29
+ res={}
30
+
31
+ begin
32
+ stats.keys.each do |k|
33
+ if stats[k]['execution_time']
34
+ res[k]=stats[k]['execution_time']['total_seconds']
35
+ end
36
+ end
37
+
38
+ rescue Excepcion => e
39
+
40
+ puts "Error reading #{file_path}"
41
+ end
42
+
43
+ if puts_json
44
+ puts JSON::pretty_generate(res)
45
+ else
46
+ total=0
47
+ res.keys.sort.each do |k|
48
+ puts "#{k}\t#{res[k]}"
49
+ total+=res[k]
50
+ end
51
+ puts "-"*20
52
+ puts "TOTAL (plugins):\t#{total}"
53
+ end
54
+ end
55
+
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'json'
4
+
5
+ if ARGV.count<1
6
+ puts "Usage: #{$0} stats1.json [stats2.json stats3.json,...]"
7
+ exit -1
8
+ end
9
+
10
+ # print header
11
+ if ARGV[0]=='-t'
12
+ heads=['sample_name','input_count','sequence_count_paired','sequence_count_single','rejected','rejected_percent']
13
+ puts heads.join("\t")
14
+ ARGV.shift
15
+ end
16
+
17
+ ARGV.each do |file_path|
18
+ sample_name = File.basename(File.expand_path(File.join(file_path,'..','..')))
19
+
20
+ stats=JSON::parse(File.read(file_path))
21
+
22
+ res=[]
23
+
24
+ begin
25
+ res << sample_name
26
+ res << stats['sequences']['count']['input_count']
27
+ res << stats['sequences']['count']['output_seqs_paired']
28
+ res << stats['sequences']['count']['output_seqs']
29
+ res << stats['sequences']['count']['rejected']
30
+ res << sprintf('%.2f',(stats['sequences']['count']['rejected'].to_f/(stats['sequences']['count']['output_seqs_paired'].to_i+stats['sequences']['count']['output_seqs'].to_i).to_f)*100)
31
+
32
+ rescue Excepcion => e
33
+
34
+ puts "Error reading #{file_path}"
35
+ end
36
+
37
+ puts res.join("\t")
38
+
39
+ end
40
+
@@ -20,9 +20,15 @@ class Plugin
20
20
  @stats ={}
21
21
 
22
22
  if can_execute?
23
+ t1=Time.now
23
24
  execute(seq)
25
+ t2=Time.now
24
26
  end
25
27
 
28
+
29
+ @stats['execution_time']={}
30
+
31
+ @stats['execution_time']['total_seconds']=t2-t1
26
32
  end
27
33
 
28
34
  def can_execute?
@@ -148,6 +148,23 @@ class PluginIndeterminations < Plugin
148
148
 
149
149
  actions=[]
150
150
 
151
+ # find simple indeterminations at the beginning of sequence
152
+ match=seq.seq_fasta.match(/^[nN]+/)
153
+
154
+ if !match.nil?
155
+ found=match[0].length
156
+
157
+ a = seq.new_action(0,found-1,'ActionIndetermination')
158
+ actions.push a
159
+
160
+ #Add actions
161
+ seq.add_actions(actions)
162
+ actions=[]
163
+ add_stats('indetermination_size',found)
164
+
165
+ end
166
+
167
+
151
168
  # find simple indeterminations at end of sequence
152
169
  match=seq.seq_fasta.match(/[nN]+$/)
153
170
 
@@ -1,4 +1,4 @@
1
1
  module Seqtrimnext
2
- VERSION = "2.0.60"
2
+ VERSION = "2.0.61"
3
3
  SEQTRIM_VERSION = VERSION
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seqtrimnext
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.60
4
+ version: 2.0.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dario Guerrero
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-23 00:00:00.000000000 Z
12
+ date: 2016-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -217,7 +217,9 @@ executables:
217
217
  - parse_json_results.rb
218
218
  - parse_params.rb
219
219
  - resume_clusters.rb
220
+ - resume_execution_times.rb
220
221
  - resume_rejected.rb
222
+ - resume_stn_stats.rb
221
223
  - reverse_paired.rb
222
224
  - seqtrimnext
223
225
  - split_fasta.rb
@@ -248,7 +250,9 @@ files:
248
250
  - bin/parse_json_results.rb
249
251
  - bin/parse_params.rb
250
252
  - bin/resume_clusters.rb
253
+ - bin/resume_execution_times.rb
251
254
  - bin/resume_rejected.rb
255
+ - bin/resume_stn_stats.rb
252
256
  - bin/reverse_paired.rb
253
257
  - bin/seqtrimnext
254
258
  - bin/split_fasta.rb
@@ -374,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
374
378
  version: '0'
375
379
  requirements: []
376
380
  rubyforge_project:
377
- rubygems_version: 2.4.8
381
+ rubygems_version: 2.4.4
378
382
  signing_key:
379
383
  specification_version: 4
380
384
  summary: Sequences preprocessing and cleaning software