Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions bbconf/modules/bedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,7 @@ def search_external_file(self, source: str, accession: str) -> BedListSearchResu
Returns:
List of bed file metadata.
"""

if source not in ["geo", "encode"]:
raise BedBaseConfError(
f"Source {source} is not supported. Supported sources are: 'geo', 'encode'."
Expand All @@ -2392,6 +2393,34 @@ def search_external_file(self, source: str, accession: str) -> BedListSearchResu
)
)
)
elif source == "geo" and accession.upper().startswith("GSM"):
statement = (
select(Bed)
.join(BedMetadata, Bed.id == BedMetadata.id)
.where(
BedMetadata.global_sample_id.contains(
cast(
[f"{source}:{accession}"],
postgresql.ARRAY(postgresql.VARCHAR),
)
)
)
)
elif source == "encode" and accession.upper().startswith("ENCSR"):
accession = accession.upper()
statement = (
select(Bed)
.join(BedMetadata, Bed.id == BedMetadata.id)
.where(
BedMetadata.global_experiment_id.contains(
cast(
[f"{source}:{accession}"],
postgresql.ARRAY(postgresql.VARCHAR),
)
)
)
)
print(statement)
else:
statement = (
select(Bed)
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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.

### [0.14.11] - 2026-04-15
### Fixed:
- External id search


### [0.14.10] - 2026-04-05
### Fixed:
- version info bug
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bbconf"
version = "0.14.10"
version = "0.14.11"
description = "Configuration and data management tool for BEDbase"
readme = "README.md"
license = "BSD-2-Clause"
Expand Down