acnfp-trans-counter 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ source "http://rubygems.org"
6
6
  # Add dependencies to develop your gem here.
7
7
  # Include everything needed to run rake, tests, features, etc.
8
8
  group :development do
9
- gem "bio", ">=1.4.1"
9
+ gem "bio", ">=1.4"
10
10
  gem "thor", ">=0.14.6"
11
11
  gem "shoulda", ">= 0"
12
12
  gem "bundler", "~> 1.0.0"
@@ -1,14 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- bio (1.4.1.5000)
4
+ bio (1.4.2)
5
5
  git (1.2.5)
6
6
  jeweler (1.5.2)
7
7
  bundler (~> 1.0.0)
8
8
  git (>= 1.2.5)
9
9
  rake
10
- rake (0.8.7)
11
- rcov (0.9.9)
10
+ rake (0.9.2)
11
+ rcov (0.9.10)
12
12
  shoulda (2.11.3)
13
13
  thor (0.14.6)
14
14
 
@@ -16,7 +16,7 @@ PLATFORMS
16
16
  ruby
17
17
 
18
18
  DEPENDENCIES
19
- bio (>= 1.4.1)
19
+ bio (>= 1.4)
20
20
  bundler (~> 1.0.0)
21
21
  jeweler (~> 1.5.2)
22
22
  rcov
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -4,15 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{acnfp-trans-counter}
8
- s.version = "0.1.0"
7
+ s.name = "acnfp-trans-counter"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert Syme"]
12
- s.date = %q{2011-04-04}
13
- s.default_executable = %q{acnfp-trans-counter}
14
- s.description = %q{A quick and dirty tool for analysis of transition and transversion frequency aross and alignment}
15
- s.email = %q{rob.syme@gmail.com}
12
+ s.date = "2011-09-15"
13
+ s.description = "A quick and dirty tool for analysis of transition and transversion frequency aross and alignment"
14
+ s.email = "rob.syme@gmail.com"
16
15
  s.executables = ["acnfp-trans-counter"]
17
16
  s.extra_rdoc_files = [
18
17
  "LICENSE.txt",
@@ -32,11 +31,11 @@ Gem::Specification.new do |s|
32
31
  "test/helper.rb",
33
32
  "test/test_acnfp-trans-counter.rb"
34
33
  ]
35
- s.homepage = %q{http://github.com/robsyme/acnfp-trans-counter}
34
+ s.homepage = "http://github.com/robsyme/acnfp-trans-counter"
36
35
  s.licenses = ["MIT"]
37
36
  s.require_paths = ["lib"]
38
- s.rubygems_version = %q{1.5.0}
39
- s.summary = %q{A quick and dirty tool for analysis of transition and transversion frequency aross and alignment}
37
+ s.rubygems_version = "1.8.10"
38
+ s.summary = "A quick and dirty tool for analysis of transition and transversion frequency aross and alignment"
40
39
  s.test_files = [
41
40
  "test/helper.rb",
42
41
  "test/test_acnfp-trans-counter.rb"
@@ -46,7 +45,7 @@ Gem::Specification.new do |s|
46
45
  s.specification_version = 3
47
46
 
48
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
- s.add_development_dependency(%q<bio>, [">= 1.4.1"])
48
+ s.add_development_dependency(%q<bio>, [">= 1.4"])
50
49
  s.add_development_dependency(%q<thor>, [">= 0.14.6"])
51
50
  s.add_development_dependency(%q<shoulda>, [">= 0"])
52
51
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -55,7 +54,7 @@ Gem::Specification.new do |s|
55
54
  s.add_runtime_dependency(%q<bio>, [">= 1.4.1"])
56
55
  s.add_runtime_dependency(%q<thor>, [">= 0.14.6"])
57
56
  else
58
- s.add_dependency(%q<bio>, [">= 1.4.1"])
57
+ s.add_dependency(%q<bio>, [">= 1.4"])
59
58
  s.add_dependency(%q<thor>, [">= 0.14.6"])
60
59
  s.add_dependency(%q<shoulda>, [">= 0"])
61
60
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -65,7 +64,7 @@ Gem::Specification.new do |s|
65
64
  s.add_dependency(%q<thor>, [">= 0.14.6"])
66
65
  end
67
66
  else
68
- s.add_dependency(%q<bio>, [">= 1.4.1"])
67
+ s.add_dependency(%q<bio>, [">= 1.4"])
69
68
  s.add_dependency(%q<thor>, [">= 0.14.6"])
70
69
  s.add_dependency(%q<shoulda>, [">= 0"])
71
70
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -12,13 +12,17 @@ class AcnfpTransCounter < Thor
12
12
  transition_count = 0
13
13
  transversion_count = 0
14
14
  indel_count = 0
15
+ informative_count = 0
15
16
 
16
17
  alignment = Bio::Alignment::OriginalAlignment.new([a,b])
17
18
  alignment.each_site do |site|
18
- next if site[0] == site[1]
19
19
  next if site.has_gap?
20
- next if site.include? "N"
21
20
 
21
+ if site[0] == site[1] or site.include? "N"
22
+ informative_count += 1
23
+ next
24
+ end
25
+
22
26
  case site.sort.map{|char| char.upcase}
23
27
  when %w{C T}, %w{A G}
24
28
  transition_count += 1
@@ -37,8 +41,8 @@ class AcnfpTransCounter < Thor
37
41
 
38
42
  puts "Transversions: %d (%.2f%%)" % [transversion_count, 100 * transversion_count / mutation_count]
39
43
  puts "Transitions: %d (%.2f%%)" % [transition_count, 100 * transition_count / mutation_count]
40
-
41
44
  puts "Transversions / Transitions: %.2f" % [transversion_count.to_f / transition_count]
45
+ puts "Non-indel sites: %d" % informative_count
42
46
  puts
43
47
  end
44
48
  end
metadata CHANGED
@@ -1,116 +1,114 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: acnfp-trans-counter
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Robert Syme
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-04-04 00:00:00 +08:00
14
- default_executable: acnfp-trans-counter
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-15 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: bio
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &27025480 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.4.1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '1.4'
24
22
  type: :development
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *27025480
25
+ - !ruby/object:Gem::Dependency
28
26
  name: thor
29
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &27025000 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
34
32
  version: 0.14.6
35
33
  type: :development
36
34
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *27025000
36
+ - !ruby/object:Gem::Dependency
39
37
  name: shoulda
40
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &27024380 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
46
44
  type: :development
47
45
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *27024380
47
+ - !ruby/object:Gem::Dependency
50
48
  name: bundler
51
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &27023740 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
51
+ requirements:
54
52
  - - ~>
55
- - !ruby/object:Gem::Version
53
+ - !ruby/object:Gem::Version
56
54
  version: 1.0.0
57
55
  type: :development
58
56
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *27023740
58
+ - !ruby/object:Gem::Dependency
61
59
  name: jeweler
62
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &26946160 !ruby/object:Gem::Requirement
63
61
  none: false
64
- requirements:
62
+ requirements:
65
63
  - - ~>
66
- - !ruby/object:Gem::Version
64
+ - !ruby/object:Gem::Version
67
65
  version: 1.5.2
68
66
  type: :development
69
67
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *26946160
69
+ - !ruby/object:Gem::Dependency
72
70
  name: rcov
73
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &26945680 !ruby/object:Gem::Requirement
74
72
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
79
77
  type: :development
80
78
  prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
79
+ version_requirements: *26945680
80
+ - !ruby/object:Gem::Dependency
83
81
  name: bio
84
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ requirement: &26945200 !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.4.1
90
88
  type: :runtime
91
89
  prerelease: false
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
90
+ version_requirements: *26945200
91
+ - !ruby/object:Gem::Dependency
94
92
  name: thor
95
- requirement: &id008 !ruby/object:Gem::Requirement
93
+ requirement: &26944680 !ruby/object:Gem::Requirement
96
94
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
100
98
  version: 0.14.6
101
99
  type: :runtime
102
100
  prerelease: false
103
- version_requirements: *id008
104
- description: A quick and dirty tool for analysis of transition and transversion frequency aross and alignment
101
+ version_requirements: *26944680
102
+ description: A quick and dirty tool for analysis of transition and transversion frequency
103
+ aross and alignment
105
104
  email: rob.syme@gmail.com
106
- executables:
105
+ executables:
107
106
  - acnfp-trans-counter
108
107
  extensions: []
109
-
110
- extra_rdoc_files:
108
+ extra_rdoc_files:
111
109
  - LICENSE.txt
112
110
  - README.rdoc
113
- files:
111
+ files:
114
112
  - .document
115
113
  - Gemfile
116
114
  - Gemfile.lock
@@ -123,37 +121,35 @@ files:
123
121
  - lib/acnfp-trans-counter.rb
124
122
  - test/helper.rb
125
123
  - test/test_acnfp-trans-counter.rb
126
- has_rdoc: true
127
124
  homepage: http://github.com/robsyme/acnfp-trans-counter
128
- licenses:
125
+ licenses:
129
126
  - MIT
130
127
  post_install_message:
131
128
  rdoc_options: []
132
-
133
- require_paths:
129
+ require_paths:
134
130
  - lib
135
- required_ruby_version: !ruby/object:Gem::Requirement
131
+ required_ruby_version: !ruby/object:Gem::Requirement
136
132
  none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 492392011685652161
141
- segments:
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ segments:
142
138
  - 0
143
- version: "0"
144
- required_rubygems_version: !ruby/object:Gem::Requirement
139
+ hash: -3079593327036305129
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
141
  none: false
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- version: "0"
142
+ requirements:
143
+ - - ! '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
150
146
  requirements: []
151
-
152
147
  rubyforge_project:
153
- rubygems_version: 1.5.0
148
+ rubygems_version: 1.8.10
154
149
  signing_key:
155
150
  specification_version: 3
156
- summary: A quick and dirty tool for analysis of transition and transversion frequency aross and alignment
157
- test_files:
151
+ summary: A quick and dirty tool for analysis of transition and transversion frequency
152
+ aross and alignment
153
+ test_files:
158
154
  - test/helper.rb
159
155
  - test/test_acnfp-trans-counter.rb