Skip to content

Commit 9467f85

Browse files
committed
Improve download links, including Globus link
1 parent 94f4dcf commit 9467f85

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

idr_gallery/templates/idr_gallery/idr_study.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,28 @@ <h3>Browse Data in IDR</h3>
9191
<h3>Download</h3>
9292

9393
{% if download_url %}
94-
<p><a target="_blank" href="{{ download_url }}">Browse original data</a></p>
94+
<p>
95+
Data is available for download via
96+
<a target="_blank" href="https://app.globus.org/file-manager?origin_id={{ globus_origin_id }}&origin_path=/pub/databases/IDR/{{ idrid_name }}">
97+
Globas: {{idrid_name}}.
98+
</a>
99+
</p>
100+
<p>
101+
To download individual files in your browser, you can
102+
<a target="_blank" href="{{ download_url }}">browse original data</a>.
103+
</p>
104+
105+
<p>
106+
For more download options, including FTP, see the IDR
107+
<a target="_blank" href="https://idr.openmicroscopy.org/about/download.html">Data download</a> page.
108+
</p>
95109
{% endif %}
96110

97-
{% if bia_page %}
98-
<p><a target="_blank" href="{{ bia_page }}">Browse OME-Zarr data at the BioImage Archive</a></p>
111+
{% if bia_id %}
112+
<p>Browse and download OME-Zarr data at <a target="_blank" href="https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/pages/{{ bia_id }}.html">BioImage Archive: {{ bia_id }}</a></p>
99113
{% endif %}
114+
115+
<p>Download as <a href="{% url 'idr_gallery_study_jsonld' idr_id %}" target="_blank">JSON</a></p>
100116
</div>
101117

102118
</div>

idr_gallery/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
logger = logging.getLogger(__name__)
3131
MAX_LIMIT = max(1, API_MAX_LIMIT)
3232

33+
EMBL_EBI_PUBLIC_GLOBAS_ID = "47772002-3e5b-4fd3-b97c-18cee38d6df2"
34+
3335

3436
def redirect_with_params(viewname, **kwargs):
3537
"""
@@ -189,16 +191,15 @@ def study_page(request, idrid, format="html", conn=None, **kwargs):
189191
img_path, data_location, is_zarr = img_info
190192

191193
download_url = None
192-
bia_page = None
194+
bia_id = None
195+
idrid_name = containers[0]["name"].split("/")[0]
193196
if data_location == "IDR":
194197
# then link to Download e.g. https://ftp.ebi.ac.uk/pub/databases/IDR/idr0002-heriche-condensation/
195198
# e.g. idr0002-heriche-condensation
196-
idrid_name = containers[0]["name"].split("/")[0]
197199
download_url = f"https://ftp.ebi.ac.uk/pub/databases/IDR/{idrid_name}"
198200

199201
elif data_location == "Embassy_S3":
200202
bia_id = img_path.split(BIA_URL, 1)[-1].split("/", 1)[0]
201-
bia_page = f"https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/pages/{bia_id}.html"
202203

203204
KNOWN_KEYS = ["Publication Authors", "Study Title", "Publication Title", "Publication DOI", "Data DOI", "License",
204205
"PubMed ID", "PMC ID", "Release Date",]

0 commit comments

Comments
 (0)