Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed Jul 23, 2024
2 parents 4fafd8e + a6a0ab9 commit 3c9e100
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions server/src/scimodom/services/annotation/ensembl.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def _get_annotation_paths(
release=annotation.release,
fmt=self.FMT,
)
# TODO: AD HOC
if annotation.taxa_id in [4932, 6239]:
filen = filen.replace(".chr", "")
url = urljoin(
specs.ENSEMBL_FTP,
f"release-{annotation.release}",
Expand Down
6 changes: 3 additions & 3 deletions server/src/scimodom/utils/specifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@

# Assembly/Annotation
ENSEMBL_FTP = "https://ftp.ensembl.org/pub"
ENSEMBL_SERVER = "http://rest.ensembl.org"
# release 110
ENSEMBL_SERVER = "http://jul2023.rest.ensembl.org" # "http://rest.ensembl.org"
ENSEMBL_DATA = "info/data"
ENSEMBL_ASM = "info/assembly"
# ENSEMBL_ASM_MAPPING = "assembly_mapping"
ENSEMBL_ASM_MAPPING = "current_assembly_chain"
ENSEMBL_ASM_MAPPING = "release-110/assembly_chain" # "current_assembly_chain"

# GtRNAdb annotation
GTRNADB_URL = "http://gtrnadb.ucsc.edu/genomes/"
Expand Down
12 changes: 6 additions & 6 deletions server/tests/unit/services/test_assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_add_assembly(Session, file_service, setup):
Session,
file_service,
url_to_data={
"https://ftp.ensembl.org/pub/current_assembly_chain/homo_sapiens/NCBI36_to_GRCh38.chain.gz": b"foo"
"https://ftp.ensembl.org/pub/release-110/assembly_chain/homo_sapiens/NCBI36_to_GRCh38.chain.gz": b"foo"
},
)
assembly_id = service.add_assembly(9606, "NCBI36")
Expand Down Expand Up @@ -339,7 +339,7 @@ def test_add_assembly_wrong_url(Session, file_service, setup):

EXPECTED_RELEASE_JSON = """{
\t"releases": [
\t\t112
\t\t110
\t]
}"""

Expand All @@ -351,8 +351,8 @@ def test_prepare_assembly_for_version(Session, file_service, setup):
Session,
file_service,
url_to_result={
"http://rest.ensembl.org/info/assembly/homo_sapiens": EXAMPLE_GENE_BUILD_DATA,
"http://rest.ensembl.org/info/data": {"releases": [112]},
"http://jul2023.rest.ensembl.org/info/assembly/homo_sapiens": EXAMPLE_GENE_BUILD_DATA,
"http://jul2023.rest.ensembl.org/info/data": {"releases": [110]},
},
)
service.prepare_assembly_for_version(1)
Expand Down Expand Up @@ -403,8 +403,8 @@ def test_prepare_assembly_for_version_build_error(Session, file_service, setup):
Session,
file_service,
url_to_result={
"http://rest.ensembl.org/info/assembly/homo_sapiens": NEWEST_EXAMPLE_GENE_BUILD_DATA,
"http://rest.ensembl.org/info/data": {"releases": [112]},
"http://jul2023.rest.ensembl.org/info/assembly/homo_sapiens": NEWEST_EXAMPLE_GENE_BUILD_DATA,
"http://jul2023.rest.ensembl.org/info/data": {"releases": [112]},
},
)
with pytest.raises(AssemblyVersionError) as exc:
Expand Down

0 comments on commit 3c9e100

Please sign in to comment.