bio-cd-hit-report 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,10 +20,19 @@ Note: this software is under active development!
20
20
  cluster_file = "cluster95.clstr"
21
21
  report = Bio::CdHitReport.new(cluster_file)
22
22
 
23
- puts report.max_members #print the max number of sequences in a cluster for the entire dataset
24
- puts report.min_members #print the minimum number of sequences in a cluster for the entire dataset
25
- puts report.total_clusters #print total number of clusters in the report
23
+ #print the max number of sequences in a cluster for the entire dataset
24
+ puts report.max_members
26
25
 
26
+ #print the minimum number of sequences in a cluster for the entire dataset
27
+ puts report.min_members
28
+
29
+ #print total number of clusters in the report
30
+ puts report.total_clusters
31
+
32
+ #print the cluster members for cluster with id 1
33
+ puts report.get_cluster(1)
34
+
35
+ #information for each cluster
27
36
  report.each_cluster do |c|
28
37
  puts "#{c.name} - #{c.members}" #print cluster name/id with respective sequences in the cluster
29
38
  puts c.size #print the total number of entries in the cluster
data/Rakefile CHANGED
@@ -17,8 +17,8 @@ Jeweler::Tasks.new do |gem|
17
17
  gem.name = "bio-cd-hit-report"
18
18
  gem.homepage = "http://github.com/georgeG/bioruby-cd-hit-report"
19
19
  gem.license = "MIT"
20
- gem.summary = %Q{A bioruby wrapper for parsing and reading CD-HIT cluster reports}
21
- gem.description = %Q{A bioruby wrapper for parsing and reading CD-HIT cluster reports}
20
+ gem.summary = %Q{Read and manipulate CD-HIT clusters}
21
+ gem.description = %Q{A Ruby library for reading CD-HIT cluster reports}
22
22
  gem.email = "georgkam@gmail.com"
23
23
  gem.authors = ["George Githinji"]
24
24
  # dependencies defined in Gemfile
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,6 +1,6 @@
1
1
  module Bio
2
2
 
3
- require_relative 'cluster.rb'
3
+ require_relative 'cluster.rb'
4
4
 
5
5
  class CdHitReport
6
6
 
@@ -16,6 +16,10 @@ require_relative 'cluster.rb'
16
16
  cluster_objs.size
17
17
  end
18
18
 
19
+ def get_cluster(name)
20
+ cluster_objs.select{|cluster| cluster.name == name.to_s}.pop.members
21
+ end
22
+
19
23
  def max_members
20
24
  cluster_objs.map{|c|c.size}.max
21
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-cd-hit-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-14 00:00:00.000000000 Z
12
+ date: 2012-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -107,7 +107,7 @@ dependencies:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
- description: A bioruby wrapper for parsing and reading CD-HIT cluster reports
110
+ description: A Ruby library for reading CD-HIT cluster reports
111
111
  email: georgkam@gmail.com
112
112
  executables:
113
113
  - bio-cd-hit-report
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: 3043469588935666177
147
+ hash: 3441050478878586342
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
@@ -156,5 +156,5 @@ rubyforge_project:
156
156
  rubygems_version: 1.8.24
157
157
  signing_key:
158
158
  specification_version: 3
159
- summary: A bioruby wrapper for parsing and reading CD-HIT cluster reports
159
+ summary: Read and manipulate CD-HIT clusters
160
160
  test_files: []