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

def Bio::GenBank::_FeatureConsumer::_add_qualifier (   self  )  [private]

Add a qualifier to the current feature without loss of info.

If there are multiple qualifier keys with the same name we
would lose some info in the dictionary, so we append a unique
number to the end of the name in case of conflicts.

Definition at line 847 of file __init__.py.

00847                             :
        """Add a qualifier to the current feature without loss of info.

        If there are multiple qualifier keys with the same name we
        would lose some info in the dictionary, so we append a unique
        number to the end of the name in case of conflicts.
        """
        # if we've got a key from before, add it to the dictionary of
        # qualifiers
        if self._cur_qualifier_key:
            key = self._cur_qualifier_key
            value = "".join(self._cur_qualifier_value)
            if self._feature_cleaner is not None:
                value = self._feature_cleaner.clean_value(key, value)
            # if the qualifier name exists, append the value
            if key in self._cur_feature.qualifiers:
                self._cur_feature.qualifiers[key].append(value)
            # otherwise start a new list of the key with its values
            else:
                self._cur_feature.qualifiers[key] = [value]

    def feature_qualifier_name(self, content_list):


Generated by  Doxygen 1.6.0   Back to index