genome-pipeline 0.0.2 → 0.0.3

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 09740883a700c684071a37504cebe596a8f4dfd2
4
+ data.tar.gz: 27c53736615681e04255de0f9b980320fa9a6463
5
+ SHA512:
6
+ metadata.gz: 4cc2234b852349c146ae94b73b53787e535e499d1623b2ce66edf7459652eed281ebe66c0f9661d6bd1c73bd601aae4e7077721b6775a61beefda7446c33273a
7
+ data.tar.gz: e0e21d89d8156f741e626ad8f5fc8c24d5da4a00e70372b678df07c32ea8fcf3d8662a1bf23c930fc90303854cfe3790cb386437834309048d4da3d7155ca3dd
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'dna'
4
- gem 'pry'
3
+ gemspec
5
4
 
6
5
  group :development do
7
6
  gem 'rake'
8
7
  gem 'bundler'
9
8
  gem 'yard'
9
+ gem 'pry'
10
10
  end
11
11
 
12
12
  group :test do
@@ -15,6 +15,8 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = gem.files.grep(%r{^test})
16
16
  gem.require_paths = ["lib"]
17
17
 
18
+ gem.add_dependency 'dna', '~> 0.3.0'
19
+
18
20
  gem.cert_chain = ['certs/audy.cert']
19
21
  gem.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $0 =~ /gem\z/
20
22
 
@@ -1,7 +1,3 @@
1
- require 'bundler'
2
-
3
- Bundler.require
4
-
5
1
  module Genome
6
2
 
7
3
  require 'genome/genome.rb'
@@ -6,7 +6,7 @@ module Genome
6
6
 
7
7
  class DummyFilter < Filter
8
8
 
9
- def transform
9
+ def call
10
10
  super
11
11
  end
12
12
 
@@ -13,7 +13,7 @@ module Genome
13
13
  @genome = Marshal.load(Marshal.dump(genome))
14
14
  end
15
15
 
16
- def transform
16
+ def call
17
17
  @genome.features << @result
18
18
  @genome
19
19
  end
@@ -1,18 +1,22 @@
1
+ require 'dna'
2
+
1
3
  module Genome
2
4
 
3
5
  class Pipeline
4
6
 
5
7
  attr_reader :steps
8
+ attr_reader :states
6
9
 
7
10
  def initialize *steps
8
11
  @steps = steps
12
+ @states = Array.new
9
13
  end
10
14
 
11
15
  def run genome
12
16
  @steps.each do |step|
13
- genome = step.new(genome).transform
17
+ @states << step.new(genome).call
14
18
  end
15
- return genome
19
+ @states.last
16
20
  end
17
21
 
18
22
 
@@ -5,7 +5,7 @@ module Genome
5
5
 
6
6
  class ProdigalFilter < Filter
7
7
 
8
- def transform
8
+ def call
9
9
  @result = run_prodigal
10
10
  super
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Genome
2
2
  class Pipeline
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
data/readme.md CHANGED
@@ -35,12 +35,8 @@ amino-acid coding sequences using Prodigal
35
35
  ```ruby
36
36
  class ProdigalFilter < Filter
37
37
 
38
- attr_reader :result
39
-
40
38
  def transform
41
39
 
42
- out_file = Tempfile.new 'prodigal'
43
-
44
40
  # run prodigal
45
41
  # read GFF and add add features to `genome`
46
42
  @result =
@@ -49,8 +45,6 @@ class ProdigalFilter < Filter
49
45
  Features.from_gff(stdout.readlines)
50
46
  end
51
47
 
52
- out_file.close
53
-
54
48
  super
55
49
  end
56
50
  end
@@ -70,9 +64,10 @@ feature finding software:
70
64
 
71
65
  - Augustus
72
66
  - tRNAscan
73
- - rnammer
74
- - snap
75
- - prokka
67
+ - rnammer (closed source)
68
+ - GeneMark (closed source)
69
+ - snap (no Bacterial HMM)
70
+ - prokka (see `add-prokka` branch)
76
71
  - barrnap
77
72
  - ARAGORN
78
73
  - repeatscout
data/spec/filter_spec.rb CHANGED
@@ -9,8 +9,8 @@ describe Genome::Pipeline::Filter do
9
9
  expect(filter).to_not eq(nil)
10
10
  end
11
11
 
12
- it '.transform should return a Genome' do
13
- expect(filter.transform).to be_a(Genome::Genome)
12
+ it '.call should return a Genome' do
13
+ expect(filter.call).to be_a(Genome::Genome)
14
14
  end
15
15
 
16
16
  it 'can be created from Genome instance' do
@@ -7,7 +7,7 @@ describe Genome::Pipeline do
7
7
 
8
8
  let(:test_filter) do
9
9
  class TestFilter < Genome::Pipeline::Filter
10
- def transform
10
+ def call
11
11
  @genome.features << 'a dummy feature'
12
12
  end
13
13
  end
@@ -18,7 +18,7 @@ describe Genome::Pipeline do
18
18
  expect(Genome::Pipeline).to_not eq(nil)
19
19
  end
20
20
 
21
- it 'can perform transformations on a Genome' do
21
+ it 'can perform callations on a Genome' do
22
22
  expect { pipeline.run(genome) }.not_to raise_error
23
23
  expect(pipeline.run(genome)).to be_a(Genome::Genome)
24
24
  end
@@ -30,8 +30,13 @@ describe Genome::Pipeline do
30
30
 
31
31
  # this belongs in filter_spec
32
32
  it '.run should not alter original features' do
33
- test_filter.new(genome).transform
33
+ test_filter.new(genome).call
34
34
  expect(genome.features.size).to eq(0)
35
35
  end
36
36
 
37
+ it '.run should save states' do
38
+ pipeline.run(genome)
39
+ expect(pipeline.states.size).to eq(1)
40
+ end
41
+
37
42
  end
@@ -1,6 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
-
4
3
  describe Genome::Pipeline::ProdigalFilter do
5
4
 
6
5
  let(:genome) { Genome::Genome.new(File.open('spec/data/genome.fasta')) }
@@ -11,11 +10,11 @@ describe Genome::Pipeline::ProdigalFilter do
11
10
  expect{filter}.not_to raise_error
12
11
  end
13
12
 
14
- it '.transform' do
15
- filtered_genome = filter.transform
13
+ it '.call' do
14
+ filtered_genome = filter.call
16
15
  expect(filtered_genome).to be_a(Genome::Genome)
17
16
  expect(filtered_genome.features).not_to eq(nil)
18
- expect(filtered_genome.features.size).not_to eq(0)
17
+ expect(filtered_genome.features.compact.size).not_to eq(0)
19
18
  end
20
19
 
21
20
  end
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genome-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Austin G. Davis-Richardson
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJRENDQWdpZ0F3SUJB
14
- Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREEyTVFvd0NBWURWUVFEREFGZk1S
15
- UXcKRWdZS0NaSW1pWlB5TEdRQkdSWUVZV2RrY2pFU01CQUdDZ21TSm9tVDhp
16
- eGtBUmtXQW1Odk1CNFhEVEUwTURjdwpPVEU1TURjMU1Wb1hEVEUxTURjd09U
17
- RTVNRGMxTVZvd05qRUtNQWdHQTFVRUF3d0JYekVVTUJJR0NnbVNKb21UCjhp
18
- eGtBUmtXQkdGblpISXhFakFRQmdvSmtpYUprL0lzWkFFWkZnSmpiekNDQVNJ
19
- d0RRWUpLb1pJaHZjTkFRRUIKQlFBRGdnRVBBRENDQVFvQ2dnRUJBTmNKVDhm
20
- dEkyZXg0Y0NKR0JUZXhvckJvUVR5VkU1WmFtZGk1MS96UE5nVQoxZXc1OWl6
21
- WUd2OC9Kak1wVXlURmRGYno4bDdybHllRXNzb3o1WWY2Z2NreGwrbmxtaUJ4
22
- dklMS3U4VzJaanlGCmEzeW1DYnllaHIvMWkrR1BvelpGeVZLZElFSUhMYWdB
23
- V2VqNE1kMkZzUURLd21hQS8rNXNTcXUxYjgwUjY3NWUKQWU5bzVHNzZHbmlO
24
- cHRpQUMvUUYvell3WEdjTUpSSmF0WXgxcUlkSzRyZFphaGxCYW96VHJJNURs
25
- NDl5TE9iLwpmWktuUmE2SVpDTCtEdVhVVmlOVGlwUHVPTHZuVVNQVHpmbm53
26
- M2RxK3liTHBEMllwcE1GSFI2NWdp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ARkWBGFnZHIxEjAQBgoJkiaJk/IsZAEZFgJjbzCCASIwDQYJKoZIhvcNAQEB
17
+ BQADggEPADCCAQoCggEBANcJT8ftI2ex4cCJGBTexorBoQTyVE5Zamdi51/zPNgU
18
+ 1ew59izYGv8/JjMpUyTFdFbz8l7rlyeEssoz5Yf6gckxl+nlmiBxvILKu8W2ZjyF
19
+ a3ymCbyehr/1i+GPozZFyVKdIEIHLagAWej4Md2FsQDKwmaA/+5sSqu1b80R675e
20
+ Ae9o5G76GniNptiAC/QF/zYwXGcMJRJatYx1qIdK4rdZahlBaozTrI5Dl49yLOb/
21
+ fZKnRa6IZCL+DuXUViNTipPuOLvnUSPTzfnnw3dq+ybLpD2YppMFHR65gioidbeV
22
+ 3rKgZau6mfzS7bne/m/SIjYTpPlYhHTExiJXhEJNzRUCAwEAAaM5MDcwCQYDVR0T
23
+ BAIwADAdBgNVHQ4EFgQUMP97xnvyjtlzDTrfwsWNNbFTIC0wCwYDVR0PBAQDAgSw
24
+ MA0GCSqGSIb3DQEBBQUAA4IBAQCuU9TA7hSQD7dytWLYfQ8S4uHreSdca4PRksxH
25
+ 36iy8SpmynKIh83UxZH9Nr8xX3kVnHX9sFYqUeyQYrLsog+etwwD51C+taMRUzYU
26
+ y2ICMXGl9U9u/lecKj/kCOJE8bDhbVD9adm+ZKVqAoq0DGlJI4xarIxwzDCVZr3v
27
+ 43LDK6ouZt7pt5TZ3wZbBsSYXcC4NVQHrxb+6YakULkyUFl6Ld2p6ID97hTOAHd2
28
+ b9RS3+P0pRzQyo2osQTnOup3ZAlfqtG90F/m5mSIvWeJQBwcZld9X2CvJ/DgSfvX
29
+ hArlAbz8jIiZ5FhHecQVQ6Q0sDljNdFh5N6SQp9afYfJ0Dlb
30
+ -----END CERTIFICATE-----
31
+ date: 2014-09-23 00:00:00.000000000 Z
32
+ dependencies:
33
+ - !ruby/object:Gem::Dependency
34
+ name: dna
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.3.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.3.0
41
47
  description: Genome processing filters and utilities
42
48
  email:
43
49
  - harekrishna@gmail.com
@@ -45,9 +51,8 @@ executables: []
45
51
  extensions: []
46
52
  extra_rdoc_files: []
47
53
  files:
48
- - .gitignore
54
+ - ".gitignore"
49
55
  - Gemfile
50
- - Gemfile.lock
51
56
  - Rakefile
52
57
  - certs/audy.cert
53
58
  - genome-pipeline.gemspec
@@ -72,36 +77,29 @@ files:
72
77
  homepage: https://github.com/audy/genome-pipeline
73
78
  licenses:
74
79
  - MIT
75
- post_install_message: ! '-------------------------------------------------
76
-
80
+ metadata: {}
81
+ post_install_message: |
82
+ -------------------------------------------------
77
83
  Thank you for installing genome-pipeline!
78
-
79
84
  -------------------------------------------------
80
-
81
- '
82
85
  rdoc_options: []
83
86
  require_paths:
84
87
  - lib
85
88
  required_ruby_version: !ruby/object:Gem::Requirement
86
- none: false
87
89
  requirements:
88
- - - ! '>='
90
+ - - ">="
89
91
  - !ruby/object:Gem::Version
90
92
  version: '0'
91
- segments:
92
- - 0
93
- hash: 1582478238090731680
94
93
  required_rubygems_version: !ruby/object:Gem::Requirement
95
- none: false
96
94
  requirements:
97
- - - ! '>='
95
+ - - ">="
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
99
  rubyforge_project:
102
- rubygems_version: 1.8.23.2
100
+ rubygems_version: 2.2.2
103
101
  signing_key:
104
- specification_version: 3
102
+ specification_version: 4
105
103
  summary: Helpers for processing genomes through a chain of annotation filters
106
104
  test_files: []
107
105
  has_rdoc:
metadata.gz.sig CHANGED
Binary file
data/Gemfile.lock DELETED
@@ -1,37 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- coderay (1.1.0)
5
- diff-lcs (1.2.5)
6
- dna (0.3.0)
7
- method_source (0.8.2)
8
- pry (0.10.0)
9
- coderay (~> 1.1.0)
10
- method_source (~> 0.8.1)
11
- slop (~> 3.4)
12
- rake (10.3.2)
13
- rspec (3.1.0)
14
- rspec-core (~> 3.1.0)
15
- rspec-expectations (~> 3.1.0)
16
- rspec-mocks (~> 3.1.0)
17
- rspec-core (3.1.4)
18
- rspec-support (~> 3.1.0)
19
- rspec-expectations (3.1.1)
20
- diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.1.0)
22
- rspec-mocks (3.1.1)
23
- rspec-support (~> 3.1.0)
24
- rspec-support (3.1.0)
25
- slop (3.5.0)
26
- yard (0.8.7.4)
27
-
28
- PLATFORMS
29
- ruby
30
-
31
- DEPENDENCIES
32
- bundler
33
- dna
34
- pry
35
- rake
36
- rspec
37
- yard