[BioPython] formatdb over python code

Christof Winter winter at biotec.tu-dresden.de
Tue Jun 10 06:13:06 EDT 2008


Stefanie Lück wrote, On 06/10/08 10:38:
> Hi!
> 
> Does someone know's whether it's possible to make a database with formatdb
> (NCBI) via python code (among Windows) and not over the console?

Here is the Python code I use for that:
cmd = "formatdb -i %s -p T -o F" % database
os.system(cmd)

-p T specifies protein sequences, -o T creates indexes, but fails if the fasta 
file does not follow the defline format (see 
http://en.wikipedia.org/wiki/Fasta_format#Sequence_identifiers). If it fails, 
use -o F.

Christof



More information about the BioPython mailing list