Skip to content

Commit

Permalink
Bio.SeqIO.index() refactor (manual merge from branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Jan 1, 2011
1 parent 197390e commit c7b409e
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 175 deletions.
6 changes: 1 addition & 5 deletions Bio/SeqIO/__init__.py
Expand Up @@ -775,11 +775,7 @@ def index(filename, format, alphabet=None, key_function=None):

#Map the file format to a sequence iterator:
import _index #Lazy import
try:
indexer = _index._FormatToIndexedDict[format]
except KeyError:
raise ValueError("Unsupported format '%s'" % format)
return indexer(filename, format, alphabet, key_function)
return _index._IndexedSeqFileDict(filename, format, alphabet, key_function)

def to_alignment(sequences, alphabet=None, strict=True):
"""Returns a multiple sequence alignment (DEPRECATED).
Expand Down

0 comments on commit c7b409e

Please sign in to comment.