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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning][].
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

## 2.1.6

### Bugfixes
- Fixed `op.translate` (and every `op.resource` call for non-human organisms) failing with HTTP 404 after HGNC dropped the `genenames/` subtree from the EBI FTP mirror; the HCOP fifteen-column files are now fetched from the new HGNC Google Cloud Storage bucket (#303)
- Removed a redundant `pd.read_csv` call in `op.translate` that re-downloaded the HCOP file a second time and bypassed the retry logic in `_download`

## 2.1.5

### Added
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = [ "hatchling" ]

[project]
name = "decoupler"
version = "2.1.5"
version = "2.1.6"
description = "Python package to perform enrichment analysis from omics data."
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
7 changes: 4 additions & 3 deletions src/decoupler/op/_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def translate(
predictions tool. Briefings in Bioinformatics, 22(6), p.bbab155.

For more information, please visit the HCOP website: https://www.genenames.org/tools/hcop/,
or alternatively check the bulk download FTP links page: https://ftp.ebi.ac.uk/pub/databases/genenames/hcop/
or the HCOP help page for bulk download details: https://www.genenames.org/help/hcop/

Parameters
----------
Expand Down Expand Up @@ -181,10 +181,11 @@ def translate(
elif target_organism == "fruitfly":
target_col = "fruit fly_symbol"
# Process orthologs
url = f"https://ftp.ebi.ac.uk/pub/databases/genenames/hcop/human_{target_organism}_hcop_fifteen_column.txt.gz"
url = (
f"https://storage.googleapis.com/public-download-files/hcop/human_{target_organism}_hcop_fifteen_column.txt.gz"
)
map_df = _download(url, verbose=verbose)
map_df = _bytes_to_pandas(map_df, low_memory=False, compression="gzip", sep="\t")
map_df = pd.read_csv(url, sep="\t", low_memory=False)
map_df["evidence"] = map_df["support"].apply(lambda x: len(x.split(",")))
map_df = map_df[map_df["evidence"] >= min_evidence]
map_df = map_df[["human_symbol", target_col]]
Expand Down
Loading