From 8cb9f06bddbe038c61de87f3d4825a922577d85b Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Fri, 17 May 2013 02:34:04 +0000 Subject: [PATCH] inprogress --- forester/ruby/scripts/nffas_parse.rb | 13 +++++++++++++ forester/ruby/scripts/x.rb | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 forester/ruby/scripts/nffas_parse.rb diff --git a/forester/ruby/scripts/nffas_parse.rb b/forester/ruby/scripts/nffas_parse.rb new file mode 100755 index 0000000..645d44d --- /dev/null +++ b/forester/ruby/scripts/nffas_parse.rb @@ -0,0 +1,13 @@ +#!/usr/local/bin/ruby -w + +infile = ARGV[ 0 ] + +File.open( infile ) do | file | + while line = file.gets + if line =~ /^>>(.+)/ + puts ">" + $1 + elsif line =~ /^([A-Z]+)/ + puts $1 + end + end +end diff --git a/forester/ruby/scripts/x.rb b/forester/ruby/scripts/x.rb index cb70c70..883b215 100644 --- a/forester/ruby/scripts/x.rb +++ b/forester/ruby/scripts/x.rb @@ -6,10 +6,10 @@ Dir.foreach(".") do |f| cmd = "#{PRG} -ie=10 -a -pe=1 -m=RRMa -s=#{taxon} #{taxon}.hmmscan_260 #{taxon}_ie10_domain_table > #{taxon}_ie10_summary_table.txt" puts cmd output = IO.popen( cmd ) - elsif f =~ /^([A-Z0-9]{3,6})_cdhit090\.hmmscan_260/ + elsif f =~ /^([A-Z0-9]{3,6})_cdhit090\.hmmscan_260/ taxon = $1 cmd = "#{PRG} -ie=10 -a -pe=1 -m=RRMa -s=#{taxon} #{taxon}_cdhit090.hmmscan_260 #{taxon}_cdhit090_ie10_domain_table > #{taxon}_cdhit090_ie10_summary_table.txt" puts cmd output = IO.popen( cmd ) - end + end end \ No newline at end of file -- 1.7.10.2