Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 3 additions & 0 deletions tools/image_processing/bia-ftplinks/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ owner: bgruening
categories:
- Imaging
description: Tool to query ftp links for study from bioimage archive
long_description: |
Tool to query ftp links for study from bioimage archive.
homepage_url: https://www.ebi.ac.uk/biostudies/bioimages/studies
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools
type: unrestricted
auto_tool_repositories:
Expand Down
34 changes: 19 additions & 15 deletions tools/image_processing/bia-ftplinks/biaftplink.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
<tool id="bia_download" name="FTP Link for Bioimage Archive" version="@VERSION@+galaxy0" profile="22.05">
<tool id="bia_download" name="FTP Link for Bioimage Archive" version="@VERSION@+galaxy1" profile="22.05">
<description>Download images from Bioimage Archive</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements" />
<command detect_errors="aggressive">
<![CDATA[
wget -r 'ftp://ftp.ebi.ac.uk/biostudies/$mode/$path'/Files;
wget -r 'ftp://ftp.ebi.ac.uk/biostudies/$mode/$path'/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="mode" type="select" label="Storage mode" help="The storage mode, can be either nfs or fire.">
<option value="fire">fire</option>
<option value="nfs">nfs</option>
</param>
<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." />
</inputs>
<outputs>
<data name="images" format="tiff">
<discover_datasets pattern="__name_and_ext__" format="tif,tiff" directory="ftp.ebi.ac.uk" visible="true" recurse="true" />
</data>
<collection name="images" type="list" label="TIFF Images">

<discover_datasets pattern="__name_and_ext__" format="tif,tiff" directory="ftp.ebi.ac.uk" recurse="true" />
</collection>
<data format="txt" name="ftplinks" from_work_dir="ftpLink.txt" label="FTP Links">
<filter>ftplink_output</filter>
</data>
Expand All @@ -31,21 +35,21 @@
<param name="mode" value="fire" />
<param name="path" value="S-BIAD/961/S-BIAD961" />
<param name="ftplink_output" value="False" />
<output name="images">
<discovered_dataset designation="Study_Component-4_mznanog_mCherry-AAT" ftype="tif">
<assert_contents><has_size value="14092624" /></assert_contents>
</discovered_dataset>
</output>
<output_collection name="images">
<element name="Study_Component-4_mznanog_mCherry-AAT">
<assert_contents><has_size value="14092624" /></assert_contents>
</element>
</output_collection>
</test>
<test expect_num_outputs='2'>
<param name="mode" value="fire" />
<param name="path" value="S-BIAD/961/S-BIAD961" />
<param name="ftplink_output" value="True" />
<output name="images">
<discovered_dataset designation="Study_Component-4_mznanog_mCherry-AAT" ftype="tif">
<output_collection name="images">
<element name="Study_Component-4_mznanog_mCherry-AAT">
<assert_contents><has_size value="14092624" /></assert_contents>
</discovered_dataset>
</output>
</element>
</output_collection>
<output name="ftplinks" ftype="txt" file="ftpLink.txt" lines_diff="0" />
</test>
</tests>
Expand Down