SequenceDB.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 SequenceDB.read() 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 SequenceDB.read() followed by SequenceDB.write().

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

Example: examples/commands/convert_sequence_db.py

from modeller import *
log.verbose()
env = Environ()

sdb = SequenceDB(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')