Darwin Help

Back to Index

database

Class database - Peptide or Nucleotide database

Calling Sequence  ReadDb(dbname)
Return Type  database
Selectors
NameTypeDescription

Entry,i stringthe offset into the database of the ith entry.

 For programming convenience, the offset of the beyond

 last entry is defined as DB[TotChars]
FileName stringname of the external file containing the database
Pat,i integerthe ith entry of the Pat index on the data, an

 integer offset
string stringthe entire database as a string
TotAA posintnumber of amino acids or bases in the database
TotChars posintnumber of characters in the database
TotEntries posintnumber of entries in the database
type stringdna, rna, mixed or peptide
Synopsis A database (DNA, RNA, mixed or peptide) is loaded with the command ReadDb. The database needs to be loaded for most operations involving sequences and alignments. The database is always available in the global variable DB. A database can be assigned to any other name, but certain operations, like finding an Entry, or using the Pat index, will perform on the database which is assigned to the global variable DB. All the selectors are read-only, they cannot be modified.

The database consists of an SGML-formatted file which contains the information about entries and sequences. For a file to be successfully loaded as a database, there have to be entries (tagged between and ). Within each entry there should be a sequence (tagged between and ) of peptides, DNA or RNA. The first time that a database is loaded, two index files are constructed. One contains the Pat index and it is stored under the name dbname.tree and the other is a quick reference for entries and is stored under the name dbname.map. If the database under dbname is changed, these two files (dbname.tree and dbname.map) should be removed to force ReadDb to rebuild them.


The Pat index maintains a total order among all the subsequences of the SEQ fields of the entries. There are as many entries in the Pat index as amino acids (or bases) in the entire database. If a Pat index is not desired, creating a null dbname.tree file will prevent ReadDb of building a Pat index.

Examples
> DB := ReadDb('/home/darwin/DB/SwissProt.Z'):;
Peptide file(/home/darwin/DB/SP45.0/SwissProt45.0(169638448), 163235
 entries, 59631787 aminoacids)
See also AC,   ConsistentGenome,   Entry,   GenomeSummary,   GetOffset,   ID,   Offset,   PatEntry,   ReadDb,   SearchDb,   SearchFrag,   SearchID,   SearchSeqDb,   SearchTag,   Sequence