Class: Bio::Iprscan::Report::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/appl/iprscan/report.rb

Overview

Description

Container class for InterProScan matches.

Usage

match = Match.new(:query_id => ...)

match.ipr_id = 'IPR001234'
match.ipr_id #=> 'IPR001234'

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Match

Returns a new instance of Match.



322
323
324
325
326
327
# File 'lib/bio/appl/iprscan/report.rb', line 322

def initialize(hash)
  @data = Hash.new
  hash.each do |key, value|
    @data[key.to_sym] = value
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, arg = nil) ⇒ Object



358
359
360
361
362
363
364
365
# File 'lib/bio/appl/iprscan/report.rb', line 358

def method_missing(name, arg = nil)
  if arg
    name = name.to_s.sub(/=$/, '') 
    @data[name.to_sym] = arg 
  else
    @data[name.to_sym]
  end
end

Instance Method Details

#accessionObject

the database members entry for this match.



350
# File 'lib/bio/appl/iprscan/report.rb', line 350

def accession;       @data[:accession];       end

#crc64Object

CRC64 checksum of query sequence.



332
# File 'lib/bio/appl/iprscan/report.rb', line 332

def crc64;           @data[:crc64];           end

#dateObject

Date for computation.



330
# File 'lib/bio/appl/iprscan/report.rb', line 330

def date;            @data[:date];            end

#descriptionObject

the database mambers description for this match.



352
# File 'lib/bio/appl/iprscan/report.rb', line 352

def description;     @data[:description];     end

#evalueObject

E-value of the match



334
# File 'lib/bio/appl/iprscan/report.rb', line 334

def evalue;          @data[:evalue];          end

#go_termsObject

the Gene Ontology description for the InterPro entry, in “Aspect :term (ID)” format.



344
# File 'lib/bio/appl/iprscan/report.rb', line 344

def go_terms;        @data[:go_terms];        end

#ipr_idObject

the corresponding InterPro entry (if any).



338
# File 'lib/bio/appl/iprscan/report.rb', line 338

def ipr_id;          @data[:ipr_id];          end

#ipr_odescriptionObject

the descriotion of the InterPro entry.



356
# File 'lib/bio/appl/iprscan/report.rb', line 356

def ipr_odescription; @data[:ipr_description]; end

#lengthObject

the length of the sequence in AA.



340
# File 'lib/bio/appl/iprscan/report.rb', line 340

def length;          @data[:length];          end

#match_endObject

the end of the domain match.



348
# File 'lib/bio/appl/iprscan/report.rb', line 348

def match_end;       @data[:match_end];       end

#match_startObject

the start of the domain match.



354
# File 'lib/bio/appl/iprscan/report.rb', line 354

def match_start;     @data[:match_start];     end

#method_nameObject

the analysis method launched.



342
# File 'lib/bio/appl/iprscan/report.rb', line 342

def method_name;          @data[:method];          end

#query_idObject

Id of the input sequence.



346
# File 'lib/bio/appl/iprscan/report.rb', line 346

def query_id;        @data[:query_id];        end

#statusObject

Status of the match (T for true / M for marginal).



336
# File 'lib/bio/appl/iprscan/report.rb', line 336

def status;          @data[:status];          end