Skip to content

Commit 9048530

Browse files
Merge pull request #116 from databio/dev
Release 0.14.11
2 parents 9949a4c + 9c751a0 commit 9048530

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

bbconf/modules/bedfiles.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,7 @@ def search_external_file(self, source: str, accession: str) -> BedListSearchResu
23742374
Returns:
23752375
List of bed file metadata.
23762376
"""
2377+
23772378
if source not in ["geo", "encode"]:
23782379
raise BedBaseConfError(
23792380
f"Source {source} is not supported. Supported sources are: 'geo', 'encode'."
@@ -2392,6 +2393,34 @@ def search_external_file(self, source: str, accession: str) -> BedListSearchResu
23922393
)
23932394
)
23942395
)
2396+
elif source == "geo" and accession.upper().startswith("GSM"):
2397+
statement = (
2398+
select(Bed)
2399+
.join(BedMetadata, Bed.id == BedMetadata.id)
2400+
.where(
2401+
BedMetadata.global_sample_id.contains(
2402+
cast(
2403+
[f"{source}:{accession}"],
2404+
postgresql.ARRAY(postgresql.VARCHAR),
2405+
)
2406+
)
2407+
)
2408+
)
2409+
elif source == "encode" and accession.upper().startswith("ENCSR"):
2410+
accession = accession.upper()
2411+
statement = (
2412+
select(Bed)
2413+
.join(BedMetadata, Bed.id == BedMetadata.id)
2414+
.where(
2415+
BedMetadata.global_experiment_id.contains(
2416+
cast(
2417+
[f"{source}:{accession}"],
2418+
postgresql.ARRAY(postgresql.VARCHAR),
2419+
)
2420+
)
2421+
)
2422+
)
2423+
print(statement)
23952424
else:
23962425
statement = (
23972426
select(Bed)

docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
44

5+
### [0.14.11] - 2026-04-15
6+
### Fixed:
7+
- External id search
8+
9+
510
### [0.14.10] - 2026-04-05
611
### Fixed:
712
- version info bug

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bbconf"
3-
version = "0.14.10"
3+
version = "0.14.11"
44
description = "Configuration and data management tool for BEDbase"
55
readme = "README.md"
66
license = "BSD-2-Clause"

0 commit comments

Comments
 (0)