Skip to content

Add FTP link to search dump#202

Draft
bilalebi wants to merge 12 commits into
mainfrom
add-ftp-to-search
Draft

Add FTP link to search dump#202
bilalebi wants to merge 12 commits into
mainfrom
add-ftp-to-search

Conversation

@bilalebi

@bilalebi bilalebi commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

🚧 This PR shouldn't be merged until we have the new FTP structure in place

What?

I added ftp field to the search dump

How?

The FTP URL itself is constructed using accession, genebuild_annotation_source and last_geneset_update

Example of how the field looks like for Escherichia coli str. K-12 substr. MG1655 str. K12:

{
   "name": "ftp",
   "value": "https://ftp.ebi.ac.uk/pub/ensemblorganisms/GCA/000/005/845/2/community/2018_09/"
},

Why?

It's needs to surface in the search results (last column in the screeshot below)
Screenshot 2026-04-30 at 16 19 38

However

The URL generated will not work for now, I believe this will move to this new FTP structure in a later date

The example URL I based these changes on:

https://ftp.ebi.ac.uk/pub/ensemblorganisms/test/GCA/000/001/215/4/ensembl/2022_07/

@bilalebi bilalebi self-assigned this Apr 30, 2026
@bilalebi bilalebi marked this pull request as draft April 30, 2026 15:34

@dpopleton dpopleton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of a much larger PR that encompasses all of the FTP strucuture changes.
I will start to work on it, but it needs:
FTP path updates (for the link on the sidebar)
JSON creation
and this.
We have another PR that included all of the work, but it was pre schema 3 and it is probably more work to migrate than to redo

Comment thread src/ensembl/production/metadata/api/search/search.py Outdated
dpopleton and others added 10 commits May 5, 2026 14:11
… required

Cause: GenomeAdaptor.get_public_path() used scalar_one_or_none() for variation/homology release lookup, but the DB can validly return multiple matching rows. Since search asks only for dataset_type="genebuild", those variation/homology lookups were unnecessary anyway.

Changes made:
- In genome.py (line 1115), variation/homology release lookup now only runs when dataset_type is all, variation, or homologies
- Replaced scalar_one_or_none() with deterministic .order_by(EnsemblRelease.release_id.desc()).scalars().first()
# Conflicts:
#	src/ensembl/production/metadata/api/adaptors/genome.py
#	src/ensembl/production/metadata/api/exports/ftp_index.py
#	src/tests/test_api.py
#	src/tests/test_exports_json.py
… do. Needs verification for search and the ftp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants