Module: Bio::Blast::Remote::Information
- Included in:
- DDBJ::Information, 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
-
#database_description(program, db) ⇒ Object
Returns a short description of given database.
-
#databases(program) ⇒ Object
Returns a list of available databases for given program.
-
#nucleotide_databases ⇒ Object
Returns a list of available nucleotide databases.
-
#protein_databases ⇒ Object
Returns a list of available protein databases.
-
#reset ⇒ Object
Resets data and clears cached data in this module.
Instance Method Details
#database_description(program, db) ⇒ Object
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
90 91 92 93 94 |
# File 'lib/bio/appl/blast/remote.rb', line 90 def database_description(program, db) _parse_databases h = @database_descriptions[program] h ? (h[db] || '') : '' end |
#databases(program) ⇒ Object
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
77 78 79 80 |
# File 'lib/bio/appl/blast/remote.rb', line 77 def databases(program) _parse_databases @databases[program] || [] end |
#nucleotide_databases ⇒ Object
Returns a list of available nucleotide databases.
Note: see the note of databases method.
- Returns
-
Array containing String objects
51 52 53 54 |
# File 'lib/bio/appl/blast/remote.rb', line 51 def nucleotide_databases _parse_databases @databases['blastn'] end |
#protein_databases ⇒ Object
Returns a list of available protein databases.
Note: see the note of databases method.
- Returns
-
Array containing String objects
61 62 63 64 |
# File 'lib/bio/appl/blast/remote.rb', line 61 def protein_databases _parse_databases @databases['blastp'] end |
#reset ⇒ Object
Resets data and clears cached data in this module.
97 98 99 100 |
# File 'lib/bio/appl/blast/remote.rb', line 97 def reset @parse_databases = false true end |