X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fruby%2Fevoruby%2Flib%2Fevo%2Ftool%2Fhmmscan_analysis.rb;h=f702b5558febcdd841404857935b5a7c032b950f;hb=7e37741c149bbf6c27555ab9cf92766155d3f4d3;hp=a94abb193ead77a2409ebdd48d5f07d8f324589b;hpb=7e8719bb4cdb7d35a63e8c6a0e88c89aa153b62a;p=jalview.git diff --git a/forester/ruby/evoruby/lib/evo/tool/hmmscan_analysis.rb b/forester/ruby/evoruby/lib/evo/tool/hmmscan_analysis.rb index a94abb1..f702b55 100644 --- a/forester/ruby/evoruby/lib/evo/tool/hmmscan_analysis.rb +++ b/forester/ruby/evoruby/lib/evo/tool/hmmscan_analysis.rb @@ -23,7 +23,7 @@ module Evoruby PRG_NAME = "hsa" PRG_VERSION = "1.001" PRG_DESC = "hmmscan analysis" - PRG_DATE = "140127" + PRG_DATE = "140128" COPYRIGHT = "2014 Christian Zmasek" CONTACT = "phyloxml@gmail.com" WWW = "https://sites.google.com/site/cmzmasek/home/software/forester" @@ -138,8 +138,7 @@ module Evoruby x_models = [] if ( cla.is_option_set?( EXTRACTION ) ) begin - x_models = cla.get_option_value( EXTRACTION ).split( "~" ) - puts x_models + x_models = cla.get_option_value( EXTRACTION ).split( "/" ) rescue ArgumentError => e Util.fatal_error( PRG_NAME, "error: " + e.to_s, STDOUT ) end @@ -168,6 +167,9 @@ module Evoruby title << "LENGTH" + "\t" title << "#DOMAINS" + "\t" title << "DOMAINS" + "\t" + unless x_models.empty? + title << "LINKERS" + "\t" + end title << "DA" + "\t" title << "DETAILED DA" puts title @@ -210,8 +212,6 @@ module Evoruby msa, extraction_output ) - - extraction_output_file = nil if extraction_output != nil extraction_output_file = File.open( extraction_output, "a" ) @@ -304,14 +304,13 @@ module Evoruby break end end - end end if matched.length < target_hmms.length return end - if hmmscan_results_per_protein_filtered.length < 1 + if hmmscan_results_per_protein_filtered.length < 1 return end @@ -344,7 +343,7 @@ module Evoruby seq = get_sequence( query, msa ) species = get_species( seq ) raise StandardError, "could not get species" if species == nil || species.empty? - if x_models != nil && x_models.length > 0 + if x_models != nil && !x_models.empty? ll = extract_linker( hmmscan_results_per_protein_filtered, x_models, seq, extraction_output_file ) end @@ -361,12 +360,13 @@ module Evoruby s << r.model + " " end s << "\t" - if msa != nil - if ll != nil - s << ll.to_s - end + + if ll != nil + s << ll.to_s s << "\t" end + + s << make_overview_da( hmmscan_results_per_protein_filtered ) s << "\t" s << make_detailed_da( hmmscan_results_per_protein_filtered, qlen ) @@ -489,7 +489,7 @@ module Evoruby puts puts " options: -" + I_E_VALUE_THRESHOLD_OPTION + ": i-E-value threshold, default is no threshold" puts " -" + FS_E_VALUE_THRESHOLD_OPTION + ": E-value threshold for full protein sequences, only for protein summary" - puts " -" + TARGET_MODELS + ": target HMMs" + puts " -" + TARGET_MODELS + ": target HMMs (separated by /)" puts " -" + EXTRACTION + ": to extract matching sequences to [outputfile]" puts end