Mercurial > repos > bgruening > bia_download
changeset 0:3085096f2b99 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 04eb6bf2ffe44b87f8c12134ac3bee33656f0673
author | bgruening |
---|---|
date | Wed, 06 Dec 2023 18:14:17 +0000 |
parents | |
children | |
files | biaftplink.xml macros.xml test-data/ftpLink.txt |
diffstat | 3 files changed, 81 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/biaftplink.xml Wed Dec 06 18:14:17 2023 +0000 @@ -0,0 +1,59 @@ +<tool id="bia_download" name="FTP Link for Bioimage Archive" version="@VERSION@+galaxy0" 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; + #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." /> + </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> + <data format="txt" name="ftplinks" from_work_dir="ftpLink.txt" label="FTP Links"> + <filter>ftplink_output</filter> + </data> + </outputs> + <tests> + <test expect_num_outputs='1'> + <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> + </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"> + <assert_contents><has_size value="14092624" /></assert_contents> + </discovered_dataset> + </output> + <output name="ftplinks" ftype="txt" file="ftpLink.txt" lines_diff="0" /> + </test> + </tests> + <help> +<![CDATA[ + **What it does** + This tool downloads images from the Bioimage Archive and optionally outputs FTP links associated with the input accession. +]]> + </help> + <expand macro="citations" /> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Dec 06 18:14:17 2023 +0000 @@ -0,0 +1,21 @@ +<macros> + <token name="@VERSION@">0.1.0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="1.20.3">wget</requirement> + <requirement type="package" version="8.4.0">curl</requirement> + <requirement type="package" version="1.6">jq</requirement> + <yield /> + </requirements> + </xml> + <xml name="citations"> + <citations> + <citation type="bibtex"> + @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> + </citations> + </xml> +</macros> +