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

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

Load all of the locations for a SeqFeature into tables.

This adds the locations related to the SeqFeature into the
seqfeature_location table. Fuzzies are not handled right now.
For a simple location, ie (1..2), we have a single table row
with seq_start = 1, seq_end = 2, location_rank = 1.

For split locations, ie (1..2, 3..4, 5..6) we would have three
row tables with:
    start = 1, end = 2, rank = 1
    start = 3, end = 4, rank = 2
    start = 5, end = 6, rank = 3

Definition at line 398 of file Loader.py.

00398                                                                 :
        """Load all of the locations for a SeqFeature into tables.

        This adds the locations related to the SeqFeature into the
        seqfeature_location table. Fuzzies are not handled right now.
        For a simple location, ie (1..2), we have a single table row
        with seq_start = 1, seq_end = 2, location_rank = 1.

        For split locations, ie (1..2, 3..4, 5..6) we would have three
        row tables with:
            start = 1, end = 2, rank = 1
            start = 3, end = 4, rank = 2
            start = 5, end = 6, rank = 3
        """
        # two cases, a simple location or a split location
        if not feature.sub_features:    # simple location
            self._insert_seqfeature_location(feature, 1, seqfeature_id)
        else: # split location
            for rank, cur_feature in enumerate(feature.sub_features):
                self._insert_seqfeature_location(cur_feature,
                                                 rank + 1,
                                                 seqfeature_id)

    def _insert_seqfeature_location(self, feature, rank, seqfeature_id):


Generated by  Doxygen 1.6.0   Back to index