[Biopython] Private '_filenames' attribute in class _SQLiteManySeqFilesDict?
Carlos Borroto
carlos.borroto at gmail.com
Fri May 3 12:42:33 EDT 2013
Hi,
I'm writing a tool to index and query a local database using
SeqIO.index_db(). I want to provide something similar to:
$ blastdbcmd -db nt -info
Database: Nucleotide collection (nt)
17,200,582 sequences; 44,123,601,625 total bases
Date: Feb 7, 2013 4:14 PM Longest sequence: 65,476,681 bases
Volumes:
/local/db/blast/nt.00
/local/db/blast/nt.01
/local/db/blast/nt.02
/local/db/blast/nt.03
/local/db/blast/nt.04
/local/db/blast/nt.05
/local/db/blast/nt.06
/local/db/blast/nt.07
/local/db/blast/nt.08
/local/db/blast/nt.09
/local/db/blast/nt.10
/local/db/blast/nt.11
/local/db/blast/nt.12
I have limited Object-Oriented Python's skills, actually very low
exposure to OO in general. The object returned by SeqIO.index_db() has
an attribute '_filenames' which I could use to report "volumes". I
recently read it is a common rule to mark private methods and
attributes with the starting underscore. Would it be safe to use
'_filenames' in this case? Could this attribute be converted to a
public one so it can be safely use without fear of breaking the code
in the future?
Thanks,
Carlos
More information about the Biopython
mailing list