Package Bio :: Module FilteredReader
[hide private]
[frames] | no frames]

Module FilteredReader

source code

Code for more fancy file handles (DEPRECATED).

This module is now deprecated, and will be removed in a future release of Biopython.

Classes: Filtered is a decorator for File that allows the user to filter the output on a line by line basis.

The FilteredReader module reads a file and applies a sequence of filters to the input The constructor sets a default filter chain, but the user can select another filter by setting Bio.FilteredReader.filter_chain.

handle = open( "filename" ) filtered_reader = Bio.FilteredReader( handle ) filtered_reader.filter_chain = [ remove_asterisks, replace_dot_with_dash ] filtered_reasder.read()

All filters in the chain must provide the same interface with a line of text as the single input parameter and altered text as the return value.

Classes [hide private]
  FilteredReader
Functions [hide private]
 
dump_saved(name, text, j)
Used for debugging.
source code
 
remove_leading_whitespace(line) source code
 
remove_empty_line(line) source code
 
remove_useless_dot(line) source code
 
fix_punctuation(line) source code
 
has_trailing_linefeed(line) source code
Variables [hide private]
  __package__ = 'Bio'
  __warningregistry__ = {('Bio.FilteredReader is deprecated, and...
Variables Details [hide private]

__warningregistry__

Value:
{('Bio.FilteredReader is deprecated, and will be removed in a future r\
elease of Biopython.  If you want to continue to use this code, please\
 get in contact with the developers via the mailing lists to avoid its\
 permanent removal from Biopython.',
  <type 'exceptions.DeprecationWarning'>,
  33): True}