inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 9 Nov 2013 05:18:15 +0000 (05:18 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 9 Nov 2013 05:18:15 +0000 (05:18 +0000)
forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb

index 25224de..7a30ef5 100644 (file)
@@ -9,6 +9,7 @@
 #
 #
 
+require 'fileutils'
 
 module Evoruby
 
@@ -66,10 +67,12 @@ module Evoruby
         counter += 1
 
         hmm_name = ""
+        id_norm = false
 
         if input.downcase.end_with?( "_ni.fasta" )
           hmm_name = input[ 0 .. input.length - 10 ]
         elsif input.downcase.end_with?( ".fasta" )
+          id_norm = true
           hmm_name = input[ 0 .. input.length - 7 ]
           puts
           puts "a. identifier normalization:"
@@ -103,6 +106,12 @@ module Evoruby
         run_command( cmd )
         puts
 
+        if id_norm
+          FileUtils.mv "#{hmm_name}_ni.fasta", "#{hmm_name}/#{hmm_name}_ni.fasta"
+          FileUtils.mv "#{hmm_name}.nim", "#{hmm_name}/#{hmm_name}.nim"
+          FileUtils.cp input, "#{hmm_name}/#{input}"
+        end
+
       end
 
     end