Class: Bio::Hinv::HitDefinition

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/bio/io/hinv.rb

Overview

serv = Bio::Hinv::HitDefinition.new serv.query(“hit” => “HIT000000001”) puts serv.result puts serv.data_source_definition puts serv.cdna_rep_h_invitational puts serv.cdna_splicing_isoform_curation puts serv.data_source_db_reference_protein_motif_id puts serv.data_source_identity puts serv.data_source_coverage puts serv.data_source_homologous_species puts serv.data_source_similarity_category

Instance Method Summary collapse

Methods included from Common

#query

Constructor Details

#initializeHitDefinition

Returns a new instance of HitDefinition.



184
185
186
# File 'lib/bio/io/hinv.rb', line 184

def initialize
  @url = BASE_URI + "hit_definition.php"
end

Instance Method Details

#cdna_rep_h_invitationalObject



207
208
209
# File 'lib/bio/io/hinv.rb', line 207

def cdna_rep_h_invitational
  @xml.elements['//CDNA_REP-H-INVITATIONAL'].text
end

#cdna_splicing_isoform_curationObject



210
211
212
# File 'lib/bio/io/hinv.rb', line 210

def cdna_splicing_isoform_curation
  @xml.elements['//CDNA_SPLICING-ISOFORM_CURATION'].text
end

#data_source_coverageObject



219
220
221
# File 'lib/bio/io/hinv.rb', line 219

def data_source_coverage
  @xml.elements['//DATA-SOURCE_COVERAGE'].text.to_f
end

#data_source_db_reference_protein_motif_idObject



213
214
215
# File 'lib/bio/io/hinv.rb', line 213

def data_source_db_reference_protein_motif_id
  @xml.elements['//DATA-SOURCE_DB-REFERENCE_PROTEIN-MOTIF-ID'].text
end

#data_source_homologous_speciesObject



222
223
224
# File 'lib/bio/io/hinv.rb', line 222

def data_source_homologous_species
  @xml.elements['//DATA-SOURCE_HOMOLOGOUS_SPECIES'].text
end

#data_source_identityObject



216
217
218
# File 'lib/bio/io/hinv.rb', line 216

def data_source_identity
  @xml.elements['//DATA-SOURCE_IDENTITY'].text.to_f
end

#data_source_similarity_categoryObject



225
226
227
# File 'lib/bio/io/hinv.rb', line 225

def data_source_similarity_category
  @xml.elements['//DATA-SOURCE_SIMILARITY-CATEGORY'].text
end

#resultObject Also known as: data_source_definition

<?xml version=‘1.0’ encoding=‘UTF-8’?> <H-Inv>

<HIT_FUNCTION>
 <H-INVITATIONAL-ID>HIT000000001</H-INVITATIONAL-ID>
 <DATA-SOURCE_DEFINITION>Rho guanine nucleotide exchange factor 10.</DATA-SOURCE_DEFINITION>
 <CDNA_REP-H-INVITATIONAL>Representative transcript</CDNA_REP-H-INVITATIONAL>
 <CDNA_SPLICING-ISOFORM_CURATION></CDNA_SPLICING-ISOFORM_CURATION>
 <DATA-SOURCE_DB-REFERENCE_PROTEIN-MOTIF-ID>NP_055444</DATA-SOURCE_DB-REFERENCE_PROTEIN-MOTIF-ID>
 <DATA-SOURCE_IDENTITY>100.0</DATA-SOURCE_IDENTITY>
 <DATA-SOURCE_COVERAGE>100.0</DATA-SOURCE_COVERAGE>
 <DATA-SOURCE_HOMOLOGOUS_SPECIES>Homo sapiens</DATA-SOURCE_HOMOLOGOUS_SPECIES>
 <DATA-SOURCE_SIMILARITY-CATEGORY>Identical to known human protein(Category I).</DATA-SOURCE_SIMILARITY-CATEGORY>
</HIT_FUNCTION>

</H-Inv>



202
203
204
# File 'lib/bio/io/hinv.rb', line 202

def result
  @xml.elements['//DATA-SOURCE_DEFINITION'].text
end