bio-cd-hit-report 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -1,14 +1 @@
1
1
  require_relative "bio-cd-hit-report/cd-hit-report"
2
-
3
- #cluster_file = "#{ENV['HOME']}/DBL_tags/cluster/cd-hit/cluster95.clstr"
4
-
5
- #report = Bio::CdHitReport.new(cluster_file)
6
- #puts report.max_members #print the max number of sequences in a cluster for the entire dataset
7
- #puts report.min_members #print the minimum number of sequences in a cluster for the entire dataset
8
- #puts report.total_clusters #print total number of clusters in the report
9
-
10
- #report.each_cluster do |c|
11
- #puts "#{c.name} - #{c.members}" #list cluster name/id with respective number of sequences in the cluster
12
- #end
13
-
14
-
@@ -26,14 +26,17 @@ require_relative 'cluster.rb'
26
26
 
27
27
  private
28
28
  def cluster_objs
29
- raw_data.map do |line|
29
+ d = raw_data.map do |line|
30
30
  cluster = line.split("\n").delete_if{|x| x == ">Cluster "}
31
31
  id = cluster.first
32
32
  cluster.shift
33
+ #puts id.inspect
33
34
  Cluster.new(id,cluster)
34
35
  end
36
+ d.delete_if {|obj| obj.id.nil?}
35
37
  end
36
38
 
39
+
37
40
  def raw_data
38
41
  File.open(@file).readlines
39
42
  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.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: -2084256407332630455
147
+ hash: 3043469588935666177
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements: