screed examples

Basic Usage

Load screed, index the database, and return a dictionary-like object:

>>> import screed
>>> db = screed.read_fasta_sequences('../screed/tests/test.fa')

Get the list of sequence names, sort alphabetically, and look at the first one:

>>> names = db.keys()
>>> names.sort()
>>> names[0]

Retrieve that record:

>>> r = db[names[0]]
>>> print r.keys()
[u'description', u'id', u'name', u'sequence']

Print out the internal ID number and the name:

>>> print
>>> print