]> git.donarmstrong.com Git - biopieces.git/commitdiff
polished asseble_seq_velvet
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 5 May 2011 08:50:41 +0000 (08:50 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 5 May 2011 08:50:41 +0000 (08:50 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1374 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/assemble_seq_velvet

index 557aa569e88c09562f2f33fa7f879b14dd6f4b81..b2dfaf899f52292262c15835ff3c12c7a25778c3 100755 (executable)
@@ -30,7 +30,6 @@
 
 require 'biopieces'
 require 'fasta'
-require 'pp'
 
 class Velvet
   def initialize(directory, sequence_file, verbose)
@@ -116,6 +115,8 @@ class Velvet
   def fasta_n50(file)
     total   = 0
     lengths = []
+    count   = 0
+    n50     = 0
 
     Fasta.open(file, mode="r") do |fasta_io|
       fasta_io.each do |entry|
@@ -124,13 +125,6 @@ class Velvet
       end
     end
 
-    n50(total, lengths)
-  end
-
-  def n50(total, lengths)
-    count = 0
-    n50   = 0
-
     lengths.sort.reverse.each do |length|
       count += length