def index_db(index_filename, filenames=None, format=None, alphabet=None, key_function=None):
 if (not isinstance(index_filename, basestring)):
  raise TypeError('Need a string for the index filename')
 if isinstance(filenames, basestring):
  filenames = [filenames]
 if ((filenames is not None) and (not isinstance(filenames, list))):
  raise TypeError('Need a list of filenames (as strings), or one filename')
 if ((format is not None) and (not isinstance(format, basestring))):
  raise TypeError('Need a string for the file format (lower case)')
 if (format and (format != format.lower())):
  raise ValueError(("Format string '%s' should be lower case" % format))
 if ((alphabet is not None) and (not (isinstance(alphabet, Alphabet) or isinstance(alphabet, AlphabetEncoder)))):
  raise ValueError(('Invalid alphabet, %r' % alphabet))
 from ._index import _FormatToRandomAccess
 from Bio.File import _SQLiteManySeqFilesDict
 repr = ('SeqIO.index_db(%r, filenames=%r, format=%r, alphabet=%r, key_function=%r)' % (index_filename, filenames, format, alphabet, key_function))
 def proxy_factory(format, filename=None):
  'Given a filename returns proxy object, else boolean if format OK.'
  if filename:
   return _FormatToRandomAccess[format](filename, format, alphabet)
  else:
   return (format in _FormatToRandomAccess)
 return _SQLiteManySeqFilesDict(index_filename, filenames, proxy_factory, format, key_function, repr)

def index_db ( index_filename , filenames = None , format = None , alphabet = None , key_function = None ) : if ( not isinstance ( index_filename , basestring ) ) : raise TypeError ( 'Need a string for the index filename' ) if isinstance ( filenames , basestring ) : filenames = [ filenames ] if ( ( filenames is not None ) and ( not isinstance ( filenames , list ) ) ) : raise TypeError ( 'Need a list of filenames (as strings), or one filename' ) if ( ( format is not None ) and ( not isinstance ( format , basestring ) ) ) : raise TypeError ( 'Need a string for the file format (lower case)' ) if ( format and ( format != format . lower ( ) ) ) : raise ValueError ( ( "Format string '%s' should be lower case" % format ) ) if ( ( alphabet is not None ) and ( not ( isinstance ( alphabet , Alphabet ) or isinstance ( alphabet , AlphabetEncoder ) ) ) ) : raise ValueError ( ( 'Invalid alphabet, %r' % alphabet ) ) from . _index import _FormatToRandomAccess from Bio . File import _SQLiteManySeqFilesDict repr = ( 'SeqIO.index_db(%r, filenames=%r, format=%r, alphabet=%r, key_function=%r)' % ( index_filename , filenames , format , alphabet , key_function ) ) def proxy_factory ( format , filename = None ) : if filename : return _FormatToRandomAccess [ format ] ( filename , format , alphabet ) else : return ( format in _FormatToRandomAccess ) return _SQLiteManySeqFilesDict ( index_filename , filenames , proxy_factory , format , key_function , repr )
indexes several search output files into an sqlite database .