Skip to content

Commit

Permalink
Update sqlalchemy version
Browse files Browse the repository at this point in the history
- Updates implicitly converted scalar queries in orf and junctions.
- Removes "threadlocal" strategy from the engine connection parameters in xml_serialiser.py as this is not supported.

Fixes #388
  • Loading branch information
ljyanesm committed Aug 5, 2021
1 parent b41d61a commit 8ae1201
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Mikado/serializers/blast_serializer/xml_serialiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def xml_pickler(configuration, filename, default_header,
cache=None,
max_target_seqs=10):
valid, _, exc = BlastOpener(filename).sniff(default_header=default_header)
engine = connect(configuration, strategy="threadlocal")
engine = connect(configuration)
session = Session(bind=engine)

if not valid:
Expand Down
2 changes: 1 addition & 1 deletion Mikado/serializers/junction.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Junction(DBBASE):
"junction_index", "chrom_id", "junction_start", "junction_end"), {"extend_existing": True})

chrom_object = relationship(Chrom, uselist=False)
chrom = column_property(select([Chrom.name]).where(chrom_id == Chrom.chrom_id))
chrom = column_property(select([Chrom.name]).where(chrom_id == Chrom.chrom_id).scalar_subquery())

def __init__(self, junction_start, junction_end, name, strand, score, chrom_id):
"""
Expand Down
2 changes: 1 addition & 1 deletion Mikado/serializers/orf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Orf(DBBASE):
backref=backref("orfs"), lazy="joined", innerjoin=True)

query = column_property(select([Query.query_name]).where(
Query.query_id == query_id))
Query.query_id == query_id).scalar_subquery())

def __init__(self, bed12_object, query_id):
if not isinstance(bed12_object, bed12.BED12):
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pysam>=0.15.3
pyyaml>=5.1.2
scipy>=1.3.1
snakemake>=5.7.0
sqlalchemy>=1.3.9,<1.4.0
sqlalchemy-utils>=0.34.1
sqlalchemy>=1.4.0
sqlalchemy-utils>=0.37
tabulate>=0.8.5
pytest>=5.4.1
python-rapidjson>=1.0.0
Expand Down

0 comments on commit 8ae1201

Please sign in to comment.