Compare commits
2 Commits
0.11.1
...
5a03c7e8d8
Author | SHA1 | Date | |
---|---|---|---|
5a03c7e8d8 | |||
ddf9cde175 |
@@ -13,6 +13,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
description = "A library to rapidly fetch fetch MLST profiles given sequences for various diseases."
|
description = "A library to rapidly fetch fetch MLST profiles given sequences for various diseases."
|
||||||
|
license = {text = "GPL-3.0-or-later"}
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://github.com/Syph-and-VPD-Lab/autoBIGS.engine"
|
Homepage = "https://github.com/Syph-and-VPD-Lab/autoBIGS.engine"
|
||||||
|
@@ -124,13 +124,17 @@ class RemoteBIGSdbMLSTProfiler(BIGSdbMLSTProfiler):
|
|||||||
|
|
||||||
async def profile_multiple_strings(self, query_named_string_groups: AsyncIterable[Iterable[NamedString]], stop_on_fail: bool = False) -> AsyncGenerator[NamedMLSTProfile, Any]:
|
async def profile_multiple_strings(self, query_named_string_groups: AsyncIterable[Iterable[NamedString]], stop_on_fail: bool = False) -> AsyncGenerator[NamedMLSTProfile, Any]:
|
||||||
async for named_strings in query_named_string_groups:
|
async for named_strings in query_named_string_groups:
|
||||||
|
names: list[str] = list()
|
||||||
|
sequences: list[str] = list()
|
||||||
for named_string in named_strings:
|
for named_string in named_strings:
|
||||||
|
names.append(named_string.name)
|
||||||
|
sequences.append(named_string.sequence)
|
||||||
try:
|
try:
|
||||||
yield NamedMLSTProfile(named_string.name, (await self.profile_string([named_string.sequence])))
|
yield NamedMLSTProfile("-".join(names), (await self.profile_string(sequences)))
|
||||||
except NoBIGSdbMatchesException as e:
|
except NoBIGSdbMatchesException as e:
|
||||||
if stop_on_fail:
|
if stop_on_fail:
|
||||||
raise e
|
raise e
|
||||||
yield NamedMLSTProfile(named_string.name, None)
|
yield NamedMLSTProfile("-".join(names), None)
|
||||||
|
|
||||||
async def close(self):
|
async def close(self):
|
||||||
await self._http_client.close()
|
await self._http_client.close()
|
||||||
|
Reference in New Issue
Block a user