[emboss-dev] number of sequences in a database

Peter Rice pmr at ebi.ac.uk
Mon Jul 25 09:35:08 UTC 2005


C Thomas wrote:

> After I index a database for use with emboss, is there an ajax API  
> call to find the total number of sequences in that database?


There are scripts in the CVS scripts/ directory:

If you CD to the database directory, the dbitest.pl script can report on the 
contents of database files. We use them for debugging.

For example:

~/emboss/scripts/dbitest.pl entrynam.idx | more
File size:        1136
Record count:       44
Record size:        19
Database name: 'EMBL'
Release:       '2.10'

Shows there are 44 records (entries) in the database for the tembl database.

You can find the script on our anonymous CVS server at 
http://cvs.open-bio.org/cgi-bin/viewcvs/viewcvs.cgi/emboss/emboss/scripts/dbitest.pl?cvsroot=emboss

(I hope my mailer wraps that correctly :-)

> I imagine that there's not a general way to get the total number of  
> hits from a seqall object, since it looks like the sequences are  
> discovered with each call to ajSeqallNext().
> Am I right about that?

No general call ... some of the database access methods can easily do this, 
others cannot. Most of them can ... so perhaps we can add a call. For methods 
that have problems .... they can refuse, or read every entry to count them.

Hope that helps,

Peter




More information about the emboss-dev mailing list