scbi_blast 0.0.42 → 0.0.43
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 +4 -0
- data/lib/scbi_blast.rb +1 -1
- data/lib/scbi_blast/batch_blast.rb +4 -1
- data/lib/scbi_blast/blast_table_result.rb +13 -2
- data/test/test_scbi_blast.rb +8 -0
- metadata +8 -7
data/History.txt
CHANGED
data/lib/scbi_blast.rb
CHANGED
@@ -83,9 +83,12 @@ class BatchBlast
|
|
83
83
|
res=''
|
84
84
|
end
|
85
85
|
|
86
|
+
|
87
|
+
|
86
88
|
# check if all sequences where processed
|
87
89
|
if parse_output
|
88
90
|
if fmt == :table
|
91
|
+
|
89
92
|
res = BlastTableResult.new(res)
|
90
93
|
elsif fmt == :xml
|
91
94
|
res = BlastStreamxmlResult.new(res)
|
@@ -104,7 +107,7 @@ class BatchBlast
|
|
104
107
|
end
|
105
108
|
end
|
106
109
|
|
107
|
-
raise "These
|
110
|
+
raise "If using table format, please, use format 7. These queries where empty or not processed: #{seq_fasta.count('>')},#{res.querys.count} by CMD: #{cmd}:\n #{not_processed} \n Full_data:\n seqs=#{seqs};\n"
|
108
111
|
end
|
109
112
|
|
110
113
|
end
|
@@ -49,8 +49,13 @@ class BlastTableResult < BlastResult
|
|
49
49
|
|
50
50
|
def parse(lines)
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
with_comments=false
|
53
|
+
|
54
|
+
if lines.first.index('#')==0
|
55
|
+
with_comments=true
|
56
|
+
if !(lines.last =~ /# BLAST processed (\d+) queries/)
|
57
|
+
raise "Blast didn't processed your queries"
|
58
|
+
end
|
54
59
|
end
|
55
60
|
|
56
61
|
query_name=''
|
@@ -112,6 +117,12 @@ class BlastTableResult < BlastResult
|
|
112
117
|
# else the hit will be added to the last query
|
113
118
|
|
114
119
|
qseqid,sacc,pident,length,mismatch,gapopen,qstart,qend,sstart,send,evalue,bitscore,score,qframe,sframe,qseq,sseq,qlen,slen,stitle = params
|
120
|
+
|
121
|
+
# if format6
|
122
|
+
#if !with_comments and query_name!=qseqid
|
123
|
+
# @querys.push BlastQuery.new(query_name)
|
124
|
+
# query_name=qseqid
|
125
|
+
#end
|
115
126
|
|
116
127
|
# creates the hit
|
117
128
|
hit = BlastHit.new(qstart,qend,sstart,send)
|
data/test/test_scbi_blast.rb
CHANGED
@@ -119,6 +119,14 @@ class TestScbiBlast < Test::Unit::TestCase
|
|
119
119
|
assert_equal(999,res.querys.count)
|
120
120
|
|
121
121
|
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_good_table_sin_c
|
125
|
+
res = BlastTableResult.new(File.join(File.dirname(__FILE__),'table_sin_c.txt'))
|
126
|
+
# the rest of querys up to 999 are empty
|
127
|
+
assert_equal(391,res.querys.count)
|
128
|
+
|
129
|
+
|
122
130
|
end
|
123
131
|
|
124
132
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scbi_blast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.43
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-simple
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '3.
|
69
|
+
version: '3.7'
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '3.
|
77
|
+
version: '3.7'
|
78
78
|
description: ! "scbi_blast is a ruby gem to handle blast+ executions using pipes when
|
79
79
|
possible to read data without the need of temporary files, \nit has been developed
|
80
80
|
at [SCBI](http://www.scbi.uma.es) by Almudena Bocinos & Dario Guerrero."
|
@@ -113,7 +113,8 @@ files:
|
|
113
113
|
- lib/scbi_blast/dust_masker.rb
|
114
114
|
- .gemtest
|
115
115
|
homepage: http://www.scbi.uma.es/downloads
|
116
|
-
licenses:
|
116
|
+
licenses:
|
117
|
+
- MIT
|
117
118
|
post_install_message:
|
118
119
|
rdoc_options:
|
119
120
|
- --main
|
@@ -134,12 +135,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
135
|
version: '0'
|
135
136
|
requirements: []
|
136
137
|
rubyforge_project: scbi_blast
|
137
|
-
rubygems_version: 1.8.
|
138
|
+
rubygems_version: 1.8.23
|
138
139
|
signing_key:
|
139
140
|
specification_version: 3
|
140
141
|
summary: scbi_blast is a ruby gem to handle blast+ executions using pipes when possible
|
141
142
|
to read data without the need of temporary files, it has been developed at [SCBI](http://www.scbi.uma.es)
|
142
143
|
by Almudena Bocinos & Dario Guerrero.
|
143
144
|
test_files:
|
144
|
-
- test/test_helper.rb
|
145
145
|
- test/test_scbi_blast.rb
|
146
|
+
- test/test_helper.rb
|