Index a file based on information in a SeqRecord object. This indexer tries to make it simple to index a file of records (ie. like a GenBank file full of entries) so that individual records can be readily retrieved. The indexing in this file takes place by converting the elements in the file into SeqRecord objects, and then indexing by some item in these SeqRecords. This is a slower method, but is very flexible. We have two default functions to index by the id and name elements of a SeqRecord (ie. LOCUS and accession number from GenBank). There is also a base class which you can derive from to create your own indexer which allows you to index by anything you feel like using python code.