scbi_blast 0.0.32 → 0.0.33

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,7 @@
1
+ === 0.0.33 2011-07-06
2
+
3
+ Added do_blast_cmd to launch any blast command
4
+
1
5
  === 0.0.32 2011-06-01
2
6
 
3
7
  Added merge support to hits
@@ -60,22 +60,9 @@ class BatchBlast
60
60
  end
61
61
 
62
62
  cmd = get_blast_cmd(fmt)
63
-
64
- res=''
65
-
66
- # Ojo, que una vez nos ibamos a volver locos buscando porque esto no devolvia todos los hits que se encontraban al ejecutar el blast a mano, y era porque en el blast a mano le estabamos pasando la secuencia completa mientras que en el MID le estabamos pasando solo los 20 primeros nt.
67
- IO.popen(cmd,'w+') {|blast|
68
- blast.sync = true
69
- blast.write(seq_fasta)
70
- blast.close_write
71
- res = blast.readlines
72
- blast.close_read
73
- }
74
-
75
- if !$?.exitstatus.nil? && $?.exitstatus>0
76
- raise "Error doing blast #{cmd} to fasta: #{seq_fasta}"
77
- end
78
-
63
+
64
+ res = BatchBlast.do_blast_cmd(seq_fasta,cmd)
65
+
79
66
  # check if all sequences where processed
80
67
  if parse_output
81
68
  if fmt == :table
@@ -101,6 +88,26 @@ class BatchBlast
101
88
  end
102
89
 
103
90
  end
91
+
92
+ return res
93
+
94
+ end
95
+
96
+ def self.do_blast_cmd(seq_fasta, cmd)
97
+ res=''
98
+
99
+ # Ojo, que una vez nos ibamos a volver locos buscando porque esto no devolvia todos los hits que se encontraban al ejecutar el blast a mano, y era porque en el blast a mano le estabamos pasando la secuencia completa mientras que en el MID le estabamos pasando solo los 20 primeros nt.
100
+ IO.popen(cmd,'w+') {|blast|
101
+ blast.sync = true
102
+ blast.write(seq_fasta)
103
+ blast.close_write
104
+ res = blast.readlines
105
+ blast.close_read
106
+ }
107
+
108
+ if !$?.exitstatus.nil? && $?.exitstatus>0
109
+ raise "Error doing blast #{cmd} to fasta: #{seq_fasta}"
110
+ end
104
111
 
105
112
  return res
106
113
 
data/lib/scbi_blast.rb CHANGED
@@ -31,7 +31,7 @@ require 'blast_hit'
31
31
  require 'blast_table_result'
32
32
 
33
33
  module ScbiBlast
34
- VERSION = '0.0.32'
34
+ VERSION = '0.0.33'
35
35
  end
36
36
 
37
37
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: scbi_blast
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.32
5
+ version: 0.0.33
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-01 00:00:00 Z
13
+ date: 2011-07-06 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe