From d5fa7369b40d754916d4206e18ec1f493cbf0def Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 24 Oct 2012 02:44:39 +0000 Subject: [PATCH] in progress --- forester/ruby/evoruby/lib/evo/io/parser/uniprot_parser.rb | 8 +++++--- forester/ruby/evoruby/lib/evo/tool/hmmscan_summary.rb | 13 ++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/forester/ruby/evoruby/lib/evo/io/parser/uniprot_parser.rb b/forester/ruby/evoruby/lib/evo/io/parser/uniprot_parser.rb index 28a5730..ec2b9f0 100644 --- a/forester/ruby/evoruby/lib/evo/io/parser/uniprot_parser.rb +++ b/forester/ruby/evoruby/lib/evo/io/parser/uniprot_parser.rb @@ -37,9 +37,11 @@ module Evoruby dr = [] read = false File.open( @file ).each do | line | - if line.index ID == 0 + if line.index( ID ) == 0 + puts line ids.each do | id | - if line.index id == 0 + puts " " + id + if line.index( id ) == 0 read = true break end @@ -51,7 +53,7 @@ module Evoruby e = UniprotEntry.new e.de = de e.dr = dr - entries << e + entries[ id ] = e de = [] dr = [] else diff --git a/forester/ruby/evoruby/lib/evo/tool/hmmscan_summary.rb b/forester/ruby/evoruby/lib/evo/tool/hmmscan_summary.rb index 82b2782..e6ba67d 100644 --- a/forester/ruby/evoruby/lib/evo/tool/hmmscan_summary.rb +++ b/forester/ruby/evoruby/lib/evo/tool/hmmscan_summary.rb @@ -21,7 +21,7 @@ module Evoruby PRG_NAME = "hsp" PRG_VERSION = "2.000" PRG_DESC = "hmmscan summary" - PRG_DATE = "2012.10.19" + PRG_DATE = "2012.10.23" COPYRIGHT = "2012 Christian M Zmasek" CONTACT = "phylosoft@gmail.com" WWW = "www.phylosoft.org" @@ -79,7 +79,7 @@ module Evoruby allowed_opts.push( IGNORE_DUF_OPTION ) allowed_opts.push( PARSE_OUT_DESCRIPITION_OPTION ) allowed_opts.push( HMM_FOR_PROTEIN_OUTPUT ) - allowed_opts.push( UNIPROT ) + allowed_opts.push( UNIPROT ) disallowed = cla.validate_allowed_options_as_str( allowed_opts ) if ( disallowed.length > 0 ) @@ -305,7 +305,8 @@ module Evoruby process_hmmscan_results_per_protein( hmmscan_results_per_protein, fs_e_value_threshold, hmm_for_protein_output, - i_e_value_threshold ) + i_e_value_threshold, + uniprot_entries ) end end outfile.flush() @@ -337,7 +338,8 @@ module Evoruby def process_hmmscan_results_per_protein( hmmscan_results_per_protein, fs_e_value_threshold, hmm_for_protein_output, - i_e_value_threshold ) + i_e_value_threshold, + uniprot_entries ) dc = 0 # filter according to i-Evalue threshold @@ -383,7 +385,8 @@ module Evoruby s << r.model + " " end s << "\t" - + s << uniprot_entries[ own.query ] + s << "\t" overview = make_overview( hmmscan_results_per_protein_filtered, hmm_for_protein_output ) s << overview + "\t" -- 1.7.10.2