From a1d2d6a1d12050f9650ab428a4d539700c2f6879 Mon Sep 17 00:00:00 2001 From: Jacob Moss Date: Tue, 12 Nov 2024 17:12:24 +0000 Subject: [PATCH] fix port for plants --- bionty/base/entities/_gene.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bionty/base/entities/_gene.py b/bionty/base/entities/_gene.py index 2f7a544..3d82fd4 100644 --- a/bionty/base/entities/_gene.py +++ b/bionty/base/entities/_gene.py @@ -100,8 +100,11 @@ def __init__(self, organism: str, version: str, kingdom: Literal['vertibrates', self._organism = ( Organism(version=version, organism=kingdom).lookup().dict().get(organism) # type:ignore ) + port = 3306 + if kingdom == "plants": + port = 4157 self._url = ( - f"mysql+mysqldb://anonymous:@ensembldb.ensembl.org/{self._organism.core_db}" + f"mysql+mysqldb://anonymous:@ensembldb.ensembl.org:{port}/{self._organism.core_db}" ) self._engine = create_engine(url=self._url)