From 329444a319dc6ca9787afb223a30d26ae761d586 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Thu, 5 May 2011 08:50:41 +0000 Subject: [PATCH] polished asseble_seq_velvet git-svn-id: http://biopieces.googlecode.com/svn/trunk@1374 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/assemble_seq_velvet | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bp_bin/assemble_seq_velvet b/bp_bin/assemble_seq_velvet index 557aa56..b2dfaf8 100755 --- a/bp_bin/assemble_seq_velvet +++ b/bp_bin/assemble_seq_velvet @@ -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 -- 2.39.2