Skip to content

Commit 93e9870

Browse files
committed
Handle idr0151 download_urls specifically
1 parent ddaef47 commit 93e9870

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

idr_gallery/views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,12 @@ def image_viewer(request, iid, conn=None, **kwargs):
598598
file_urls.append({"url": f"{github_url}/{urllib.parse.quote(file_path)}", "path": file_path})
599599
else:
600600
file_urls.append({"url": f"{download_url}/{urllib.parse.quote(file_path)}", "path": file_path})
601+
elif path.startswith("bia-idr/S-BIAD582/"):
602+
# for idr0151 path is e.g. bia-idr/S-BIAD582/05_wt_wg488-opa546-cadintron594-OPAprotein647/overlays/6a_05_wt_wg488-opa546-cadintron594-OPAprotein647_014_closeup_overlay.tif
603+
# Need to manually map to e.g...
604+
# https://ftp.ebi.ac.uk/biostudies/fire/S-BIAD/582/S-BIAD582/Files/05_wt_wg488-opa546-cadintron594-OPAprotein647/overlays/6a_05_wt_wg488-opa546-cadintron594-OPAprotein647_014_closeup_overlay.tif
605+
url = path.replace("bia-idr/S-BIAD582/", "https://ftp.ebi.ac.uk/biostudies/fire/S-BIAD/582/S-BIAD582/Files/")
606+
file_urls.append({"url": url, "path": path})
601607
else:
602608
file_urls.append({"url": None, "path": path})
603609
fileset_id = image.fileset.id.val

0 commit comments

Comments
 (0)