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

def BioSQL::Loader::DatabaseLoader::_load_seqfeature_qualifiers (   self,
  qualifiers,
  seqfeature_id 
) [private]

Insert the (key, value) pair qualifiers relating to a feature.

Qualifiers should be a dictionary of the form:
    {key : [value1, value2]}

Definition at line 440 of file Loader.py.

00440                                                                     :
        """Insert the (key, value) pair qualifiers relating to a feature.

        Qualifiers should be a dictionary of the form:
            {key : [value1, value2]}
        """
        tag_ontology_id = self._get_ontology_id('Annotation Tags')
        for qualifier_key in qualifiers.keys():
            qualifier_key_id = self._get_term_id(qualifier_key,
                                                 ontology_id = tag_ontology_id)

            # now add all of the values to their table
            for qual_value_rank in range(len(qualifiers[qualifier_key])):
                qualifier_value = qualifiers[qualifier_key][qual_value_rank]
                sql = r"INSERT INTO seqfeature_qualifier_value VALUES" \
                      r" (%s, %s, %s, %s)"
                self.adaptor.execute(sql, (seqfeature_id,
                  qualifier_key_id, qual_value_rank + 1, qualifier_value))
       
class DatabaseRemover:


Generated by  Doxygen 1.6.0   Back to index