Module: OpenTox::Algorithm::Substructure

Includes:
OpenTox::Algorithm
Defined in:
lib/algorithm.rb

Instance Attribute Summary

Attributes included from OpenTox

#metadata, #uri

Class Method Summary collapse

Methods included from OpenTox::Algorithm

effect, gauss, get_cdk_descriptors, get_jl_descriptors, get_ob_descriptors, isnull_or_singular?, load_ds_csv, min_frequency, numeric?, pc_descriptors, #run, sum_size, #to_rdfxml, zero_variance?

Methods included from OpenTox

#add_metadata, all, #delete, #initialize, #load_metadata, sign_in, text_to_html, #to_rdfxml

Class Method Details

.lookup(params) ⇒ Hash

Substructure matching with number of non-unique hits

Parameters:

  • required (Hash)

    keys: compound, features, feature_dataset_uri, pc_type

Returns:

  • (Hash)

    Hash with matching Smarts and number of hits



612
613
614
# File 'lib/algorithm.rb', line 612

def self.lookup(params)
  params[:compound].lookup(params[:features], params[:feature_dataset_uri], params[:pc_type], params[:lib], params[:subjectid])
end

.match(params) ⇒ Array

Substructure matching

Parameters:

  • required (Hash)

    keys: compound, features

Returns:

  • (Array)

    Array with matching Smarts



598
599
600
# File 'lib/algorithm.rb', line 598

def self.match(params)
  params[:compound].match(params[:features])
end

.match_hits(params) ⇒ Hash

Substructure matching with number of non-unique hits

Parameters:

  • required (Hash)

    keys: compound, features

Returns:

  • (Hash)

    Hash with matching Smarts and number of hits



605
606
607
# File 'lib/algorithm.rb', line 605

def self.match_hits(params)
  params[:compound].match_hits(params[:features])
end