From 975245ceaed44110c385764241a55853de418c06 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 31 Oct 2012 21:21:52 +0000 Subject: [PATCH] changed order_pairs2 to gdbm git-svn-id: http://biopieces.googlecode.com/svn/trunk@1978 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/order_pairs2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bp_bin/order_pairs2 b/bp_bin/order_pairs2 index b816366..473f14e 100755 --- a/bp_bin/order_pairs2 +++ b/bp_bin/order_pairs2 @@ -29,7 +29,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< require 'maasha/biopieces' -require 'dbm' +require 'gdbm' require 'pp' ILLUMINA15 = 15 @@ -38,10 +38,10 @@ ILLUMINA18 = 18 options = Biopieces.options_parse(ARGV) tmpdir = Biopieces.mktmpdir -#tmpdir = "Sletmig" +tmpdir = "Sletmig" tmpfile = File.join(tmpdir, "data") -db = DBM.new(tmpfile) +db = GDBM.new(tmpfile) Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| input.each_record do |record| @@ -97,7 +97,9 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| end end -File.delete(tmpfile + ".db") +db.close + +FileUtils.remove_entry_secure("#{tmpfile}.db", true) # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -- 2.39.5