rbfam 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 69c97958b2246fffbb4915ee3d60bcd5161c15dd
4
+ data.tar.gz: 6cbba5157ab211ee188328d1fed2a6b83a07f32b
5
+ SHA512:
6
+ metadata.gz: 81d8588a7aae75b41d777409740a0db75107ec0b7e5ba059110511da286fc50c1c40314c8471120a862e73e27657146ca37dd8db4f62b70d7d8b02a198526511
7
+ data.tar.gz: d07932c2d7981fa90f9146554a4c81cdd5497e367c870d13f40bae445bb422affb904a13fef6caaab559fd130d633cf35e5891e9d4a2e2ac8ed412d0122fb7c0
@@ -0,0 +1,11 @@
1
+ {
2
+ "purine": "RF00167",
3
+ "tpp": "RF00059",
4
+ "secis_1": "RF00031",
5
+ "trna": "RF00005",
6
+ "let_7": "RF00027",
7
+ "snora71": "RF00056",
8
+ "u7": "RF00066",
9
+ "rose": "RF00435",
10
+ "hammerhead_3": "RF00008"
11
+ }
@@ -2,22 +2,21 @@ module Rbfam
2
2
  class Family
3
3
  include Rbfam::CommonHelpers
4
4
 
5
- attr_reader :family_name
5
+ attr_reader :family_name, :description
6
6
 
7
7
  class << self
8
- def purine; new("RF00167"); end
9
- def tpp; new("RF00059"); end
10
- def secis_1; new("RF00031"); end
11
- def trna; new("RF00005"); end
12
- def let_7; new("RF00027"); end
13
- def snora71; new("RF00056"); end
14
- def u7; new("RF00066"); end
15
- def rose; new("RF00435"); end
16
- def hammerhead_3; new("RF00008"); end
8
+ def method_missing(name, *args, &block)
9
+ READABLE[name.to_s] ? new(READABLE[name.to_s]) : super
10
+ end
17
11
  end
18
12
 
19
- def initialize(family_name)
13
+ def initialize(family_name, description = "")
20
14
  @family_name = family_name
15
+ @description = description
16
+ end
17
+
18
+ def id
19
+ ("%s %s" % [family_name, description.downcase]).strip.gsub(/\W+/, "_")
21
20
  end
22
21
 
23
22
  def alignment
data/lib/rbfam.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "json"
1
2
  require "bio"
2
3
  require "vienna_rna"
3
4
  require "entrez"
@@ -12,4 +13,6 @@ module Rbfam
12
13
  def self.script(name)
13
14
  require "rbfam/scripts/#{File.basename(name, '.rb')}"
14
15
  end
15
- end
16
+ end
17
+
18
+ Rbfam::Family.const_set(:READABLE, JSON.parse(File.read(File.join(File.dirname(__FILE__), "rbfam", "helpers", "simple_names.json"))))
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbfam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Evan Senter
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-06 00:00:00.000000000 Z
11
+ date: 2013-04-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bio
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.4.2
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.4.2
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: entrez
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.5.8.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.5.8.1
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: httparty
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.8.3
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.8.3
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: vienna_rna
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 0.1.3
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 0.1.3
78
69
  description: Light wrapper for RFam data in Ruby.
@@ -82,6 +73,7 @@ extensions: []
82
73
  extra_rdoc_files: []
83
74
  files:
84
75
  - lib/rbfam/helpers/common.rb
76
+ - lib/rbfam/helpers/simple_names.json
85
77
  - lib/rbfam/modules/alignment.rb
86
78
  - lib/rbfam/modules/family.rb
87
79
  - lib/rbfam/modules/sequence.rb
@@ -91,26 +83,25 @@ files:
91
83
  - README.md
92
84
  homepage: http://rubygems.org/gems/rbfam
93
85
  licenses: []
86
+ metadata: {}
94
87
  post_install_message:
95
88
  rdoc_options: []
96
89
  require_paths:
97
90
  - lib
98
91
  required_ruby_version: !ruby/object:Gem::Requirement
99
- none: false
100
92
  requirements:
101
- - - ! '>='
93
+ - - '>='
102
94
  - !ruby/object:Gem::Version
103
95
  version: '0'
104
96
  required_rubygems_version: !ruby/object:Gem::Requirement
105
- none: false
106
97
  requirements:
107
- - - ! '>='
98
+ - - '>='
108
99
  - !ruby/object:Gem::Version
109
100
  version: '0'
110
101
  requirements: []
111
102
  rubyforge_project:
112
- rubygems_version: 1.8.24
103
+ rubygems_version: 2.0.2
113
104
  signing_key:
114
- specification_version: 3
105
+ specification_version: 4
115
106
  summary: Bindings to Rfam.
116
107
  test_files: []