Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BH2024] Update Bioimaging Archive retrieval tool #1541

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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: 4 additions & 2 deletions tools/image_processing/bia-ftplinks/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: bia_download
owner: bgruening
categories:
- Imaging
description: Tool to query ftp links for study from bioimage archive
description: Tool to query FTP links for studies from the BioImage Archive
long_description: A wrapper that wget's FTP links for studies from the BioImage Archive (https://www.ebi.ac.uk/bioimage-archive/).
homepage_url: https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/bia-ftplinks
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools
type: unrestricted
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "A Tool to query ftp links by study name(s) from bioimage archive."
description_template: "A tool to query FTP links by study name(s) from the BioImage Archive."
42 changes: 34 additions & 8 deletions tools/image_processing/bia-ftplinks/biaftplink.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
<tool id="bia_download" name="FTP Link for Bioimage Archive" version="@VERSION@+galaxy0" profile="22.05">
<description>Download images from Bioimage Archive</description>
<tool id="bia_download" name="FTP Link for BioImage Archive" version="@VERSION@+galaxy1" profile="23.0">
<description>Download images from BioImage Archive</description>
<macros>
<import>macros.xml</import>
</macros>
<edam_topics>
<edam_topic>topic_3383</edam_topic>
</edam_topics>
<edam_operations>
<edam_operation>operation_2422</edam_operation>
</edam_operations>
<expand macro="requirements" />
<command detect_errors="aggressive">
<![CDATA[
wget -r 'ftp://ftp.ebi.ac.uk/biostudies/$mode/$path'/Files;
#set $accession = str($path)
#if $accession.startswith('S-BIAD') and '/' not in $accession
#set $accession_number = $accession[6:]
#set $accession = 'S-BIAD/' + $accession_number + '/' + $accession
#end if
wget -r 'ftp://ftp.ebi.ac.uk/biostudies/$mode/$accession'/Files;
#if '$ftp_output'
#set study = $path.split('/')[-1].rstrip('/')
curl https://www.ebi.ac.uk/biostudies/api/v1/studies/$study/info -s |jq -r .ftpLink >>ftpLink.txt
#end if
]]>
</command>
<inputs>
<param name="mode" type="text" label="Storage mode" help="The storage mode, can be either nfs or fire."/>
<param name="path" type="text" label="The path of accession. e.g. S-BIAD/570/S-BIAD570 "/>
<param name="ftplink_output" type="boolean" label="Generate FTP links?" help="If set, a file containing FTP links associated with the accession will be generated." />
<param name="mode" type="select" label="Storage mode" help="FIRE (default) or NFS. See help section below for more information." optional="false">
<option value="fire" selected="true">FIRE</option>
<option value="nfs">NFS</option>
</param>
<param name="path" type="text" label="Accession number or path (e.g. S-BIAD570 or S-BIAD/570/S-BIAD570)" optional="false" help="All publically available data in the BioImage Archive (from the Bioimages - Core collection) is accessible &lt;a href='https://www.ebi.ac.uk/biostudies/BioImages/studies' target='_blank'&gt;here&lt;/a&gt;. Each study is associated with a unique accession number e.g. S-BIAD570."/>
<param name="ftplink_output" type="boolean" label="Generate FTP links?" help="If set, a file containing FTP links associated with the accession will be generated."/>
</inputs>
<outputs>
<data name="images" format="tiff">
Expand Down Expand Up @@ -51,9 +65,21 @@
</tests>
<help>
<![CDATA[
**What it does**
**What it does**

This tool downloads images from the Bioimage Archive and optionally outputs FTP links associated with the input accession.

**Additional help**

- Storage mode
FIle REplication or FIRE is EMBL-EBI's very large-scale object data storage system. At the moment of writing, all their studies have been migrated to FIRE storage. This is why it is the default option. However, they are introducing a new feature that will use NFS as a storage option (again), so the data you want to download might live on NFS in the near future. This is the reason both options are available.


- Accession number
This tool only supports studies part of the 'BioImages - Core' collection, which can be recongized by having an accession number that follows the 'S-BIAD000' pattern. Providing the whole path is also suported (e.g. S-BIAD/000/S-BIAD000).


]]>
</help>
<expand macro="citations" />
</tool>
</tool>
2 changes: 1 addition & 1 deletion tools/image_processing/bia-ftplinks/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<xml name="citations">
<citations>
<citation type="bibtex">
@misc{bia,,
@misc{bia,
title = "BioImage Archive Downloading via ftp",
note = "https://www.ebi.ac.uk/bioimage-archive/help-download/",
url = "https://www.ebi.ac.uk/bioimage-archive/help-download/"}</citation>
Expand Down
Loading