genome-pipeline 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +13 -0
- data/Gemfile.lock +35 -0
- data/Rakefile +2 -0
- data/genome-pipeline.gemspec +24 -0
- data/installation.md +7 -0
- data/lib/genome/genome/feature.rb +52 -0
- data/lib/genome/genome/genome.rb +30 -0
- data/lib/genome/genome.rb +2 -0
- data/lib/genome/pipeline/filter.rb +26 -0
- data/lib/genome/pipeline/pipeline.rb +6 -0
- data/lib/genome/pipeline/prodigal_filter.rb +29 -0
- data/lib/genome/pipeline/version.rb +5 -0
- data/lib/genome/pipeline.rb +13 -0
- data/readme.md +72 -0
- data/spec/data/genome.fasta +54216 -0
- data/spec/data/prodigal.gff +4266 -0
- data/spec/filter_spec.rb +20 -0
- data/spec/genome_spec.rb +26 -0
- data/spec/pipeline_spec.rb +9 -0
- data/spec/prodigal_filter_spec.rb +18 -0
- data/spec/spec_helper.rb +4 -0
- metadata +73 -0
data/spec/filter_spec.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Genome::Pipeline::Filter do
|
4
|
+
|
5
|
+
let(:filter) { Genome::Pipeline::Filter.new(genome) }
|
6
|
+
let(:genome) { Genome::Genome.new(File.open('spec/data/genome.fasta')) }
|
7
|
+
|
8
|
+
it 'exists' do
|
9
|
+
expect(filter).to_not eq(nil)
|
10
|
+
end
|
11
|
+
|
12
|
+
it '.transform should return a Genome' do
|
13
|
+
expect(filter.transform).to be_a(Genome::Genome)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'can be created from Genome instance' do
|
17
|
+
expect(filter).to be_a(Genome::Pipeline::Filter)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
data/spec/genome_spec.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Genome do
|
4
|
+
|
5
|
+
let (:fasta_handle) { File.open('spec/data/genome.fasta') }
|
6
|
+
let (:genome) { Genome::Genome.new(fasta_handle) }
|
7
|
+
|
8
|
+
it '.new' do
|
9
|
+
expect(genome).to_not eq(nil)
|
10
|
+
end
|
11
|
+
|
12
|
+
it '.fasta' do
|
13
|
+
genome.fasta do |path|
|
14
|
+
expect(path).to_not eq(nil)
|
15
|
+
expect(File.exist?(path)).to eq(true)
|
16
|
+
|
17
|
+
records = File.open(path) do |handle|
|
18
|
+
Dna.new(handle, format: :fasta).to_a
|
19
|
+
end
|
20
|
+
|
21
|
+
expect(records.size).not_to eq(0)
|
22
|
+
expect(`grep -c '^>' #{path}`).to eq(`grep -c '^>' 'spec/data/genome.fasta'`)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
|
4
|
+
describe Genome::Pipeline::ProdigalFilter do
|
5
|
+
|
6
|
+
let(:genome) { Genome::Genome.new(File.open('spec/data/genome.fasta')) }
|
7
|
+
|
8
|
+
let(:filter) { Genome::Pipeline::ProdigalFilter.new(genome) }
|
9
|
+
|
10
|
+
it '.new' do
|
11
|
+
expect{filter}.not_to raise_error
|
12
|
+
end
|
13
|
+
|
14
|
+
it '.transform' do
|
15
|
+
expect(filter.transform).to be_a(Genome::Genome)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: genome-pipeline
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Austin G. Davis-Richardson
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-09-20 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Genome processing filters and utilities
|
15
|
+
email:
|
16
|
+
- harekrishna@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- Gemfile
|
22
|
+
- Gemfile.lock
|
23
|
+
- Rakefile
|
24
|
+
- genome-pipeline.gemspec
|
25
|
+
- installation.md
|
26
|
+
- lib/genome/genome.rb
|
27
|
+
- lib/genome/genome/feature.rb
|
28
|
+
- lib/genome/genome/genome.rb
|
29
|
+
- lib/genome/pipeline.rb
|
30
|
+
- lib/genome/pipeline/filter.rb
|
31
|
+
- lib/genome/pipeline/pipeline.rb
|
32
|
+
- lib/genome/pipeline/prodigal_filter.rb
|
33
|
+
- lib/genome/pipeline/version.rb
|
34
|
+
- readme.md
|
35
|
+
- spec/data/genome.fasta
|
36
|
+
- spec/data/prodigal.gff
|
37
|
+
- spec/filter_spec.rb
|
38
|
+
- spec/genome_spec.rb
|
39
|
+
- spec/pipeline_spec.rb
|
40
|
+
- spec/prodigal_filter_spec.rb
|
41
|
+
- spec/spec_helper.rb
|
42
|
+
homepage: https://github.com/audy/genome-pipeline
|
43
|
+
licenses:
|
44
|
+
- MIT
|
45
|
+
post_install_message: ! '-------------------------------------------------
|
46
|
+
|
47
|
+
Thank you for installing genome-pipeline!
|
48
|
+
|
49
|
+
-------------------------------------------------
|
50
|
+
|
51
|
+
'
|
52
|
+
rdoc_options: []
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ! '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubyforge_project:
|
69
|
+
rubygems_version: 1.8.23.2
|
70
|
+
signing_key:
|
71
|
+
specification_version: 3
|
72
|
+
summary: Helpers for processing genomes through a chain of annotation filters
|
73
|
+
test_files: []
|