Table of Contents

Class: FeatureValueCleaner Bio/GenBank/utils.py

Provide specialized capabilities for cleaning up values in features.

This class is designed to provide a mechanism to clean up and process values in the key/value pairs of GenBank features. This is useful because in cases like:

/translation="MED YDPWNLRFQSKYKSRDA"

you'll end up with a value with s and spaces in it like: "MED YDPWEL..."

which you probably don't want.

This cleaning needs to be done on a case by case basis since it is impossible to interpret whether you should be concatenating everything (as in translations), or combining things with spaces (as might be the case with /notes).

Methods   
__init__
_clean_translation
clean_value
  __init__ 
__init__ ( self,  to_process=keys_to_process )

Initialize with the keys we should deal with.

  _clean_translation 
_clean_translation ( self,  value )

Concatenate a translation value to one long protein string.

  clean_value 
clean_value (
        self,
        key_name,
        value,
        )

Clean the specified value and return it.

If the value is not specified to be dealt with, the original value will be returned.

Exceptions   
AssertionError( "No function to clean key: %s" % key_name )

Table of Contents

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