]> git.donarmstrong.com Git - biopieces.git/commitdiff
changed order_pairs2 to gdbm
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 31 Oct 2012 21:21:52 +0000 (21:21 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 31 Oct 2012 21:21:52 +0000 (21:21 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1978 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/order_pairs2

index b8163668b14faf9db9da94dd97ad7a8c2fbd5939..473f14e0601b0498190c19c75a7bf6069976c11e 100755 (executable)
@@ -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)
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<