From 844d5907875104837f37056b48aa3d5b7db2c518 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Sat, 9 Nov 2013 05:18:15 +0000 Subject: [PATCH] inprogress --- forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb b/forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb index 25224de..7a30ef5 100644 --- a/forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb +++ b/forester/ruby/evoruby/exe/run_phylo_pipeline_x.rb @@ -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 -- 1.7.10.2