Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::GenBank::_Scanner::__init__ (   self,
  debug = 0 
)

Initialize the scanner by setting up our caches.

Creating the parser takes a long time, so we want to cache it
to reduce parsing time.

Arguments:
o debug - The level of debugging that the parser should
display. Level 0 is no debugging, Level 2 displays the most
debugging info (but is much slower). See Martel documentation
for more info on this.

Definition at line 1203 of file __init__.py.

01203                                  :
        """Initialize the scanner by setting up our caches.

        Creating the parser takes a long time, so we want to cache it
        to reduce parsing time.

        Arguments:
        o debug - The level of debugging that the parser should
        display. Level 0 is no debugging, Level 2 displays the most
        debugging info (but is much slower). See Martel documentation
        for more info on this.
        """
        import Martel
        # a listing of all tags we are interested in scanning for
        # in the MartelParser
        self.interest_tags = ["locus", "size", "residue_type",
                              "data_file_division", "date",
                              "definition", "accession", "nid",
                              "pid", "version", "db_source",
                              "gi", "keywords", "segment",
                              "source", "organism",
                              "taxonomy", "reference_num",
                              "reference_bases", "authors", "consrtm", "title",
                              "journal", "medline_id", "pubmed_id",
                              "remark", "comment",
                              "features_line", "feature_key",
                              "location", "feature_qualifier_name",
                              "feature_qualifier_description", "origin_name",
                              "base_count", "base_number",
                              "sequence", "contig_location", "record_end","primary_ref_line"]

        # a listing of all tags which should be left alone with respect
        # to whitespace handling
        self.exempt_tags = ["comment", "feature_qualifier_name"]

        # make a parser that returns only the tags we are interested in
        expression = Martel.select_names(genbank.record,
                                         self.interest_tags)
        self._parser = expression.make_parser(debug_level = debug)

    def feed(self, handle, consumer):


Generated by  Doxygen 1.6.0   Back to index