next up previous contents index
Next: search Up: The sequence_db class: using Previous: sequence_db.write() write   Contents   Index

sequence_db.convert() -- convert a database to binary format

convert(chains_list, seq_database_file, seq_database_format, outfile, clean_sequences=True, minmax_db_seq_len=(0, 999999))
This command will read a database of sequences, in PIR or FASTA format, and write it out in BINARY format. See for an explanation of the parameters used. outfile gives the name of the resulting binary file.

The conversion process is done one sequence at a time, so this requires substantially less system memory than followed by sequence_db.write().

Any existing data in the database is discarded by this routine, and the database is empty when the function finishes.

Example: examples/commands/

env = environ()

sdb = sequence_db(env)
sdb.convert(seq_database_file='pdb95.fsa', seq_database_format='FASTA',
            chains_list='ALL', minmax_db_seq_len=[1, 40000],
            clean_sequences=True, outfile='pdb95.bin')

Ben Webb 2008-05-05