Module: Bio::Blast::Remote::Information

Included in:
GenomeNet::Information
Defined in:
lib/bio/appl/blast/remote.rb

Overview

Common methods for meta-information processing (e.g. list of databases).

Instance Method Summary (collapse)

Instance Method Details

- (Object) database_description(program, db)

Returns a short description of given database.

Note: see the note of databases method.


Arguments:

  • program (required): 'blastn', 'blastp', 'blastx', 'tblastn' or 'tblastx'

  • db (required): database name

Returns

String



81
82
83
84
85
# File 'lib/bio/appl/blast/remote.rb', line 81

def database_description(program, db)
  _parse_databases
  h = @database_descriptions[program]
  h ? (h[db] || '') : ''
end

- (Object) databases(program)

Returns a list of available databases for given program.

Note: It parses remote sites to obtain database information (e.g. blast.genome.jp/ for Bio::Blast::Remote::GenomeNet). Thus, if the site is changed, this method can not return correct data. Please tell BioRuby developers when the site is changed.


Arguments:

  • program (required): blast program('blastn', 'blastp', 'blastx', 'tblastn' or 'tblastx')

Returns

Array containing String objects



68
69
70
71
# File 'lib/bio/appl/blast/remote.rb', line 68

def databases(program)
  _parse_databases
  @databases[program] || []
end

- (Object) nucleotide_databases

Returns a list of available nucleotide databases.

Note: see the note of databases method.


Returns

Array containing String objects



42
43
44
45
# File 'lib/bio/appl/blast/remote.rb', line 42

def nucleotide_databases
  _parse_databases
  @databases['blastn']
end

- (Object) protein_databases

Returns a list of available protein databases.

Note: see the note of databases method.


Returns

Array containing String objects



52
53
54
55
# File 'lib/bio/appl/blast/remote.rb', line 52

def protein_databases
  _parse_databases
  @databases['blastp']
end

- (Object) reset

Resets data and clears cached data in this module.



88
89
90
91
# File 'lib/bio/appl/blast/remote.rb', line 88

def reset
  @parse_databases = false
  true
end