fasta_util 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/fasta_util +3 -0
  3. data/fasta_util.gemspec +8 -9
  4. metadata +69 -74
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -60,15 +60,18 @@ class FastaUtility < Thor
60
60
  method_option :inverse_match, :aliases => '-v', :type => :boolean, :desc => "Return the inverse of the match after all the other filters have been applied."
61
61
  method_option :defline_grep, :aliases => '-d', :type => :string, :default => '', :desc => "A regular expression, used to search the entry's definition line."
62
62
  method_option :definitions_file, :aliases => '-f', :type => :string, :default => '', :desc => "A file with definitions to match, one per line."
63
+ method_option :entry_id_file, :aliases => '-e', :type => :string, :default => '', :desc => "A file with entry_ids to match, one per line."
63
64
  def filter(filename)
64
65
  invoke :filecheck
65
66
  invoke :filecheck, [options.definitions_file]
66
67
  requested_definitions = File.open(options.definitions_file).map{|definition| definition.strip} unless options.definitions_file == ''
68
+ entry_ids = File.open(options.entry_id_file).map{|id| id.strip} unless options.entry_id_file == ''
67
69
  Bio::FlatFile.open(filename).each do |entry|
68
70
  passed = true
69
71
  passed &&= (entry.length >= options.length_cutoff)
70
72
  passed &&= (entry.definition.match(Regexp.new(options.defline_grep)))
71
73
  passed &&= (requested_definitions.include? entry.definition) unless options.definitions_file == ''
74
+ passed &&= (entry_ids.include? entry.entry_id) unless options.entry_id_file == ''
72
75
  passed = !passed if options.inverse_match
73
76
  puts entry if passed
74
77
  end
@@ -4,15 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{fasta_util}
8
- s.version = "0.5.1"
7
+ s.name = "fasta_util"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["robsyme"]
12
- s.date = %q{2011-07-13}
13
- s.default_executable = %q{fasta_util}
14
- s.description = %q{Easy fasta filtering, wrapping, calculating common statistics, sorting etc. Based on the fasta_tool script that I think was written by Jason Stajich.}
15
- s.email = %q{rob.syme@gmail.com}
12
+ s.date = "2011-11-18"
13
+ s.description = "Easy fasta filtering, wrapping, calculating common statistics, sorting etc. Based on the fasta_tool script that I think was written by Jason Stajich."
14
+ s.email = "rob.syme@gmail.com"
16
15
  s.executables = ["fasta_util"]
17
16
  s.extra_rdoc_files = [
18
17
  "LICENSE.txt",
@@ -31,11 +30,11 @@ Gem::Specification.new do |s|
31
30
  "test/helper.rb",
32
31
  "test/test_fasta_util.rb"
33
32
  ]
34
- s.homepage = %q{http://github.com/robsyme/fasta_util}
33
+ s.homepage = "http://github.com/robsyme/fasta_util"
35
34
  s.licenses = ["MIT"]
36
35
  s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.5.0}
38
- s.summary = %q{A simple tool for performing common tasks with fasta files.}
36
+ s.rubygems_version = "1.8.10"
37
+ s.summary = "A simple tool for performing common tasks with fasta files."
39
38
  s.test_files = [
40
39
  "test/helper.rb",
41
40
  "test/test_fasta_util.rb"
metadata CHANGED
@@ -1,105 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fasta_util
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.2
4
5
  prerelease:
5
- version: 0.5.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - robsyme
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-13 00:00:00 +08:00
14
- default_executable: fasta_util
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-11-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: shoulda
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &19773680 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :development
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *19773680
25
+ - !ruby/object:Gem::Dependency
28
26
  name: bundler
29
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &19706300 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
29
+ requirements:
32
30
  - - ~>
33
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
34
32
  version: 1.0.0
35
33
  type: :development
36
34
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *19706300
36
+ - !ruby/object:Gem::Dependency
39
37
  name: jeweler
40
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &19705760 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
40
+ requirements:
43
41
  - - ~>
44
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
45
43
  version: 1.5.2
46
44
  type: :development
47
45
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *19705760
47
+ - !ruby/object:Gem::Dependency
50
48
  name: rcov
51
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &19705160 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
57
55
  type: :development
58
56
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *19705160
58
+ - !ruby/object:Gem::Dependency
61
59
  name: bio
62
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &19704640 !ruby/object:Gem::Requirement
63
61
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
67
65
  version: 1.4.1
68
66
  type: :runtime
69
67
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *19704640
69
+ - !ruby/object:Gem::Dependency
72
70
  name: thor
73
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &19704080 !ruby/object:Gem::Requirement
74
72
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
78
76
  version: 0.14.6
79
77
  type: :runtime
80
78
  prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
79
+ version_requirements: *19704080
80
+ - !ruby/object:Gem::Dependency
83
81
  name: rspec
84
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ requirement: &19703600 !ruby/object:Gem::Requirement
85
83
  none: false
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
89
87
  version: 1.2.3
90
88
  type: :development
91
89
  prerelease: false
92
- version_requirements: *id007
93
- description: Easy fasta filtering, wrapping, calculating common statistics, sorting etc. Based on the fasta_tool script that I think was written by Jason Stajich.
90
+ version_requirements: *19703600
91
+ description: Easy fasta filtering, wrapping, calculating common statistics, sorting
92
+ etc. Based on the fasta_tool script that I think was written by Jason Stajich.
94
93
  email: rob.syme@gmail.com
95
- executables:
94
+ executables:
96
95
  - fasta_util
97
96
  extensions: []
98
-
99
- extra_rdoc_files:
97
+ extra_rdoc_files:
100
98
  - LICENSE.txt
101
99
  - README.rdoc
102
- files:
100
+ files:
103
101
  - .document
104
102
  - Gemfile
105
103
  - Gemfile.lock
@@ -111,37 +109,34 @@ files:
111
109
  - fasta_util.gemspec
112
110
  - test/helper.rb
113
111
  - test/test_fasta_util.rb
114
- has_rdoc: true
115
112
  homepage: http://github.com/robsyme/fasta_util
116
- licenses:
113
+ licenses:
117
114
  - MIT
118
115
  post_install_message:
119
116
  rdoc_options: []
120
-
121
- require_paths:
117
+ require_paths:
122
118
  - lib
123
- required_ruby_version: !ruby/object:Gem::Requirement
119
+ required_ruby_version: !ruby/object:Gem::Requirement
124
120
  none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 107780182399010435
129
- segments:
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ segments:
130
126
  - 0
131
- version: "0"
132
- required_rubygems_version: !ruby/object:Gem::Requirement
127
+ hash: -1315820014973782293
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
129
  none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- version: "0"
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
138
134
  requirements: []
139
-
140
135
  rubyforge_project:
141
- rubygems_version: 1.5.0
136
+ rubygems_version: 1.8.10
142
137
  signing_key:
143
138
  specification_version: 3
144
139
  summary: A simple tool for performing common tasks with fasta files.
145
- test_files:
140
+ test_files:
146
141
  - test/helper.rb
147
142
  - test/test_fasta_util.rb