require 'lib/evo/util/util'
require 'lib/evo/util/command_line_arguments'
require 'lib/evo/io/parser/hmmscan_parser'
-require 'lib/evo/io/web/uniprotkb'
module Evoruby
class HmmscanSummary
PRG_NAME = "hsp"
- PRG_VERSION = "2.001"
+ PRG_VERSION = "2.002"
PRG_DESC = "hmmscan summary"
- PRG_DATE = "2013.10.23"
+ PRG_DATE = "130319"
COPYRIGHT = "2013 Christian M Zmasek"
CONTACT = "phyloxml@gmail.com"
WWW = "https://sites.google.com/site/cmzmasek/home/software/forester"
HMM_FOR_PROTEIN_OUTPUT = "m"
IGNORE_DUF_OPTION = "i"
PARSE_OUT_DESCRIPITION_OPTION = "a"
- UNIPROT = "u"
HELP_OPTION_1 = "help"
HELP_OPTION_2 = "h"
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( SPECIES_OPTION )
disallowed = cla.validate_allowed_options_as_str( allowed_opts )
end
end
-
-
fs_e_value_threshold = -1.0
if ( cla.is_option_set?( FS_E_VALUE_THRESHOLD_OPTION ) )
begin
end
end
- uniprot = ""
- if ( cla.is_option_set?( UNIPROT ) )
- begin
- uniprot = cla.get_option_value( UNIPROT )
- rescue ArgumentError => e
- Util.fatal_error( PRG_NAME, "error: " + e.to_s, STDOUT )
- end
- end
-
species = "HUMAN"
if ( cla.is_option_set?( SPECIES_OPTION ) )
begin
if !hmm_for_protein_output.empty?
puts( "HMM for proteins : " + hmm_for_protein_output )
end
- if !uniprot.empty?
- puts( "Uniprot : " + uniprot )
- end
puts()
begin
parse_descriptions,
fs_e_value_threshold,
hmm_for_protein_output,
- uniprot,
species )
rescue IOError => e
Util.fatal_error( PRG_NAME, "error: " + e.to_s, STDOUT )
get_descriptions,
fs_e_value_threshold,
hmm_for_protein_output,
- uniprot,
species )
Util.check_file_for_readability( inpath )
fs_e_value_threshold,
hmm_for_protein_output,
i_e_value_threshold,
- false,
species )
end
hmmscan_results_per_protein.clear
fs_e_value_threshold,
hmm_for_protein_output,
i_e_value_threshold,
- uniprot,
species )
end
fs_e_value_threshold,
hmm_for_protein_output,
i_e_value_threshold,
- uniprotkb,
species )
dc = 0
if r.model == hmm_for_protein_output
- if i_e_value_threshold > 0.0 && r.fs_e_value > fs_e_value_threshold
+ if fs_e_value_threshold > 0.0 && r.fs_e_value > fs_e_value_threshold
return
end
end
end
s << "\t"
- if !uniprotkb.empty?
- #e = UniprotKB::get_entry_by_id( process_id( own.query ) )
-
- #if e != nil
- # s << uniprot_annotation( e )
- # # s << "\uniprot_annotationt"
- #end
- end
-
overview = make_overview( hmmscan_results_per_protein_filtered, hmm_for_protein_output )
s << overview + "\t"
prev_r = nil
hmmscan_results_per_protein_filtered.each do | r |
-
if prev_r != nil
s << make_interdomain_sequence( r.env_from - prev_r.env_to - 1 )
else
s << "]"
prev_r = r
end
- s << make_interdomain_sequence( own.qlen - prev_r.env_from, false )
+ s << make_interdomain_sequence( own.qlen - prev_r.env_to, false )
puts s
end
- def uniprot_annotation( e )
- s = ""
- pdb_ids = e.get_pdb_ids
- if !pdb_ids.empty?
- pdb_ids.each do | pdb |
- s << pdb << ", "
- end
- else
- s << "-"
- end
- s
- end
-
def calc_linkers( hmmscan_results_per_protein_filtered, hmm_for_protein_output )
linkers = ""
prev_r = nil