Table of Contents

Module: SimpleSeqRecord Bio/Mindy/SimpleSeqRecord.py

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.

Imported modules   
from Bio.builders.SeqRecord.sequence import BuildSeqRecord
Functions   
create_berkeleydb
create_flatdb
  create_berkeleydb 
create_berkeleydb (
        files,
        db_name,
        indexer=SimpleIndexer(),
        )

--- convenience functions for indexing you should just use these unless you are doing something fancy

  create_flatdb 
create_flatdb (
        files,
        db_name,
        indexer=SimpleIndexer(),
        )

Classes   
BaseSeqRecordIndexer

Base class for indexing using SeqRecord information.

FixDocumentBuilder

A SAX builder-style class to make a parsed SeqRecord available.

SimpleIndexer

Index a file based on .id and .name attributes of a SeqRecord.


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:17 2002 by HappyDoc version 2.0.1