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

def BioSQL::Loader::DatabaseLoader::_insert_seqfeature_location (   self,
  feature,
  rank,
  seqfeature_id 
) [private]

Add a location of a SeqFeature to the seqfeature_location table.

Definition at line 421 of file Loader.py.

00421                                                                        :
        """Add a location of a SeqFeature to the seqfeature_location table.
        """
        sql = r"INSERT INTO location (seqfeature_id, " \
              r"start_pos, end_pos, strand, rank) " \
              r"VALUES (%s, %s, %s, %s, %s)"

        # convert biopython locations to the 1-based location system
        # used in bioSQL
        # XXX This could also handle fuzzies
        start = feature.location.nofuzzy_start + 1
        end = feature.location.nofuzzy_end
        # Biopython uses None when we don't know strand information but
        # BioSQL requires something (non null) and sets this as zero
        # So we'll use the strand or 0 if Biopython spits out None
        strand = feature.strand or 0

        self.adaptor.execute(sql, (seqfeature_id, start, end, strand, rank))

    def _load_seqfeature_qualifiers(self, qualifiers, seqfeature_id):


Generated by  Doxygen 1.6.0   Back to index