Beispiel #1
0
    def __init__(self, Species, Release, account=None, pool_recycle=None):
        super(Genome, self).__init__()

        assert Release, 'invalid release specified'
        if account is None:
            account = get_ensembl_account(release=Release)

        self._account = account
        self._pool_recycle = pool_recycle

        # TODO: check Release may not be necessary because: assert Release above
        if Release is None:
            Release = get_latest_release(account=account)

        self._gen_release = None

        # TODO make name and release immutable properties
        self.Species = _Species.getSpeciesName(Species)
        self.Release = str(Release)

        # the db connections
        self._core_db = None
        self._var_db = None
        self._other_db = None
        self._feature_type_ids = FeatureTypeCache(self)
        self._feature_coord_levels = FeatureCoordLevels(self.Species)
Beispiel #2
0
 def test_feature_levels(self):
     ChickenFeatureLevels = FeatureCoordLevels('chicken')
     chicken_feature_levels = ChickenFeatureLevels(
         feature_types=['gene', 'cpg', 'est'],
         core_db=self.chicken.CoreDb,
         otherfeature_db=self.chicken.OtherFeaturesDb)
     self.assertEquals(chicken_feature_levels['repeat'].levels, ['contig'])
     self.assertEquals(set(chicken_feature_levels['cpg'].levels),\
                         set(['contig', 'supercontig', 'chromosome']))