bio-blastxmlparser 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-19mode # JRuby in 1.9 mode
6
+ - rbx-19mode
7
+ # - 1.8.7
8
+ # - jruby-18mode # JRuby in 1.8 mode
9
+ # - rbx-18mode
10
+
11
+ # uncomment this line if your project needs to run something other than `rake`:
12
+ # script: bundle exec rspec spec
data/Gemfile CHANGED
@@ -12,7 +12,10 @@ gem "nokogiri", ">= 1.5.0"
12
12
  # Include everything needed to run rake, tests, features, etc.
13
13
  group :development do
14
14
  # gem "rspec", "~> 2.3.0"
15
- gem "bundler", "~> 1.0.15"
16
- gem "jeweler", "~> 1.6.4"
15
+ gem "rake", ">= 0.9.2.2"
16
+ gem "bundler"
17
+ gem "jeweler", "~> 1.8.4"
18
+ gem "rspec", ">= 2.3.0"
19
+ gem "rdoc", ">= 2.4.2"
17
20
  # gem "rcov", ">= 0"
18
21
  end
data/Gemfile.lock CHANGED
@@ -3,20 +3,36 @@ GEM
3
3
  specs:
4
4
  bio-logger (1.0.0)
5
5
  log4r (>= 1.1.9)
6
+ diff-lcs (1.1.3)
6
7
  git (1.2.5)
7
- jeweler (1.6.4)
8
+ jeweler (1.8.4)
8
9
  bundler (~> 1.0)
9
10
  git (>= 1.2.5)
10
11
  rake
12
+ rdoc
13
+ json (1.6.5)
11
14
  log4r (1.1.9)
12
15
  nokogiri (1.5.0)
13
- rake (0.9.2)
16
+ rake (0.9.2.2)
17
+ rdoc (3.12)
18
+ json (~> 1.4)
19
+ rspec (2.8.0)
20
+ rspec-core (~> 2.8.0)
21
+ rspec-expectations (~> 2.8.0)
22
+ rspec-mocks (~> 2.8.0)
23
+ rspec-core (2.8.0)
24
+ rspec-expectations (2.8.0)
25
+ diff-lcs (~> 1.1.2)
26
+ rspec-mocks (2.8.0)
14
27
 
15
28
  PLATFORMS
16
29
  ruby
17
30
 
18
31
  DEPENDENCIES
19
32
  bio-logger (>= 1.0.0)
20
- bundler (~> 1.0.15)
21
- jeweler (~> 1.6.4)
33
+ bundler
34
+ jeweler (~> 1.8.4)
22
35
  nokogiri (>= 1.5.0)
36
+ rake (>= 0.9.2.2)
37
+ rdoc (>= 2.4.2)
38
+ rspec (>= 2.3.0)
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- blastxmlparser is listed at http://biogems.info/
1
+ blastxmlparser is listed at http://biogems.info
2
2
 
3
3
  = bio-blastxmlparser
4
4
 
data/Rakefile CHANGED
@@ -26,18 +26,26 @@ Jeweler::Tasks.new do |gem|
26
26
  end
27
27
  Jeweler::RubygemsDotOrgTasks.new
28
28
 
29
- # require 'rspec/core'
30
- # require 'rspec/core/rake_task'
31
- # RSpec::Core::RakeTask.new(:spec) do |spec|
32
- # spec.pattern = FileList['spec/**/*_spec.rb']
33
- # end
29
+ require 'rspec/core'
30
+ require 'rspec/core/rake_task'
31
+ RSpec::Core::RakeTask.new(:spec) do |spec|
32
+ spec.pattern = FileList['spec/**/*_spec.rb']
33
+ end
34
34
 
35
35
  # RSpec::Core::RakeTask.new(:rcov) do |spec|
36
36
  # spec.pattern = 'spec/**/*_spec.rb'
37
37
  # spec.rcov = true
38
38
  # end
39
39
 
40
- task :default => :spec
40
+ task :default => [ :test, :spec ]
41
+
42
+ require 'rake/testtask'
43
+ Rake::TestTask.new(:test) do |test|
44
+ test.libs << 'lib' << 'test'
45
+ # test.pattern = 'test/**/test_*.rb' # breaks in 1.9.3
46
+ test.test_files = Dir.glob("test/**/test_*.rb")
47
+ test.verbose = true
48
+ end
41
49
 
42
50
  require 'rdoc/task'
43
51
  RDoc::Task.new do |rdoc|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.1.0
@@ -0,0 +1,86 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "bio-blastxmlparser"
8
+ s.version = "1.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Pjotr Prins"]
12
+ s.date = "2012-08-08"
13
+ s.description = "Fast big data XML parser and library, libxml2 based 50x faster than BioRuby"
14
+ s.email = "pjotr.public01@thebird.nl"
15
+ s.executables = ["blastxmlparser"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".rspec",
23
+ ".travis.yml",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE.txt",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "bin/blastxmlparser",
31
+ "bio-blastxmlparser.gemspec",
32
+ "lib/bio-blastxmlparser.rb",
33
+ "lib/bio/db/blast/parser/nokogiri.rb",
34
+ "lib/bio/db/blast/xmliterator.rb",
35
+ "lib/bio/db/blast/xmlsplitter.rb",
36
+ "sample/bioruby.rb",
37
+ "sample/blastxmlparserdemo.rb",
38
+ "sample/libxml_sax.rb",
39
+ "sample/nokogiri_dom.rb",
40
+ "sample/nokogiri_sax.rb",
41
+ "sample/nokogiri_split_dom.rb",
42
+ "spec/bio-blastxmlparser_spec.rb",
43
+ "spec/spec_helper.rb",
44
+ "test/data/aa_example.fasta",
45
+ "test/data/aa_example_blastp.m7",
46
+ "test/data/nt_example.fasta",
47
+ "test/data/nt_example_blastn.m7",
48
+ "timings.sh"
49
+ ]
50
+ s.homepage = "http://github.com/pjotrp/blastxmlparser"
51
+ s.licenses = ["MIT"]
52
+ s.require_paths = ["lib"]
53
+ s.rubygems_version = "1.8.10"
54
+ s.summary = "Very fast BLAST XML parser and library for big data"
55
+
56
+ if s.respond_to? :specification_version then
57
+ s.specification_version = 3
58
+
59
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
60
+ s.add_runtime_dependency(%q<bio-logger>, [">= 1.0.0"])
61
+ s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.0"])
62
+ s.add_development_dependency(%q<rake>, [">= 0.9.2.2"])
63
+ s.add_development_dependency(%q<bundler>, [">= 0"])
64
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
65
+ s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
66
+ s.add_development_dependency(%q<rdoc>, [">= 2.4.2"])
67
+ else
68
+ s.add_dependency(%q<bio-logger>, [">= 1.0.0"])
69
+ s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
70
+ s.add_dependency(%q<rake>, [">= 0.9.2.2"])
71
+ s.add_dependency(%q<bundler>, [">= 0"])
72
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
73
+ s.add_dependency(%q<rspec>, [">= 2.3.0"])
74
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
75
+ end
76
+ else
77
+ s.add_dependency(%q<bio-logger>, [">= 1.0.0"])
78
+ s.add_dependency(%q<nokogiri>, [">= 1.5.0"])
79
+ s.add_dependency(%q<rake>, [">= 0.9.2.2"])
80
+ s.add_dependency(%q<bundler>, [">= 0"])
81
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
82
+ s.add_dependency(%q<rspec>, [">= 2.3.0"])
83
+ s.add_dependency(%q<rdoc>, [">= 2.4.2"])
84
+ end
85
+ end
86
+
@@ -8,9 +8,9 @@ module Bio
8
8
  module XPath
9
9
  def field name
10
10
  res = if @prefix
11
- @xml.xpath(@prefix+name+'/text()')
11
+ @xml.xpath(@prefix+name+'/text()').to_s
12
12
  else
13
- @xml.xpath(name+'/text()')
13
+ @xml.xpath(name+'/text()').to_s
14
14
  end
15
15
  if res == nil
16
16
  logger = Bio::Log::LoggerPlus['bio-blastxmlparser']
@@ -68,6 +68,7 @@ module Bio
68
68
  'Hsp_hit-frame' => :hit_frame,
69
69
  'Hsp_identity' => :identity,
70
70
  'Hsp_positive' => :positive,
71
+ 'Hsp_gaps' => :gaps,
71
72
  'Hsp_align-len' => :align_len
72
73
  MapXPath.define_f 'Hsp_bit-score' => :bit_score,
73
74
  'Hsp_evalue' => :evalue
@@ -1,9 +1,9 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  TESTFILE = "./test/data/nt_example_blastn.m7"
4
+ include Bio::Blast
4
5
 
5
6
  describe "Bio::Blast::NokogiriBlastXml" do
6
- include Bio::Blast
7
7
  before(:all) do
8
8
  n = NokogiriBlastXml.new(File.new(TESTFILE)).to_enum
9
9
  @iter1 = n.next
@@ -43,6 +43,7 @@ describe "Bio::Blast::NokogiriBlastXml" do
43
43
  hsp.identity.should == 73
44
44
  hsp.positive.should == 73
45
45
  hsp.align_len.should == 73
46
+ hsp.gaps.should == 0
46
47
  hsp.qseq.should == "AGTGAAGCTTCTAGATATTTGGCGGGTACCTCTAATTTTGCCTGCCTGCCAACCTATATGCTCCTGTGTTTAG"
47
48
  hsp.hseq.should == "AGTGAAGCTTCTAGATATTTGGCGGGTACCTCTAATTTTGCCTGCCTGCCAACCTATATGCTCCTGTGTTTAG"
48
49
  hsp.midline.should == "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
@@ -46,6 +46,7 @@
46
46
  <Hsp_identity>73</Hsp_identity>
47
47
  <Hsp_positive>73</Hsp_positive>
48
48
  <Hsp_align-len>73</Hsp_align-len>
49
+ <Hsp_gaps>0</Hsp_gaps>
49
50
  <Hsp_qseq>AGTGAAGCTTCTAGATATTTGGCGGGTACCTCTAATTTTGCCTGCCTGCCAACCTATATGCTCCTGTGTTTAG</Hsp_qseq>
50
51
  <Hsp_hseq>AGTGAAGCTTCTAGATATTTGGCGGGTACCTCTAATTTTGCCTGCCTGCCAACCTATATGCTCCTGTGTTTAG</Hsp_hseq>
51
52
  <Hsp_midline>|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||</Hsp_midline>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-blastxmlparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-31 00:00:00.000000000Z
12
+ date: 2012-08-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bio-logger
16
- requirement: &83898200 !ruby/object:Gem::Requirement
16
+ requirement: &14068420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *83898200
24
+ version_requirements: *14068420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &83897710 !ruby/object:Gem::Requirement
27
+ requirement: &14067240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,29 +32,62 @@ dependencies:
32
32
  version: 1.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *83897710
35
+ version_requirements: *14067240
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &14066000 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 0.9.2.2
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *14066000
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: bundler
38
- requirement: &83897190 !ruby/object:Gem::Requirement
49
+ requirement: &14064760 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
- - - ~>
52
+ - - ! '>='
42
53
  - !ruby/object:Gem::Version
43
- version: 1.0.15
54
+ version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *83897190
57
+ version_requirements: *14064760
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: jeweler
49
- requirement: &83895540 !ruby/object:Gem::Requirement
60
+ requirement: &14063640 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
53
64
  - !ruby/object:Gem::Version
54
- version: 1.6.4
65
+ version: 1.8.4
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *14063640
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: &14062500 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 2.3.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *14062500
80
+ - !ruby/object:Gem::Dependency
81
+ name: rdoc
82
+ requirement: &14055400 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: 2.4.2
55
88
  type: :development
56
89
  prerelease: false
57
- version_requirements: *83895540
90
+ version_requirements: *14055400
58
91
  description: Fast big data XML parser and library, libxml2 based 50x faster than BioRuby
59
92
  email: pjotr.public01@thebird.nl
60
93
  executables:
@@ -66,6 +99,7 @@ extra_rdoc_files:
66
99
  files:
67
100
  - .document
68
101
  - .rspec
102
+ - .travis.yml
69
103
  - Gemfile
70
104
  - Gemfile.lock
71
105
  - LICENSE.txt
@@ -73,6 +107,7 @@ files:
73
107
  - Rakefile
74
108
  - VERSION
75
109
  - bin/blastxmlparser
110
+ - bio-blastxmlparser.gemspec
76
111
  - lib/bio-blastxmlparser.rb
77
112
  - lib/bio/db/blast/parser/nokogiri.rb
78
113
  - lib/bio/db/blast/xmliterator.rb
@@ -105,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
140
  version: '0'
106
141
  segments:
107
142
  - 0
108
- hash: -1032070769
143
+ hash: -1696395694674995706
109
144
  required_rubygems_version: !ruby/object:Gem::Requirement
110
145
  none: false
111
146
  requirements:
@@ -114,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
149
  version: '0'
115
150
  requirements: []
116
151
  rubyforge_project:
117
- rubygems_version: 1.8.6
152
+ rubygems_version: 1.8.10
118
153
  signing_key:
119
154
  specification_version: 3
120
155
  summary: Very fast BLAST XML parser and library for big data