Mercurial > repos > bgruening > bia_download
view biaftplink.xml @ 1:da04d8500636 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit b17cc0d9aecd14784adac77e17aa267fb5739ada
author | bgruening |
---|---|
date | Tue, 22 Apr 2025 16:04:47 +0000 |
parents | ff80c1b5816b |
children |
line wrap: on
line source
<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[ curl -s https://www.ebi.ac.uk/biostudies/api/v1/studies/$accession/info | jq -r .ftpLink >> ftpLink.txt && wget -q -r -l 0 -A "*.tiff,*.tif,*.png,*.jpg,*.zip" -i ftpLink.txt && find . -type f -name "*.zip" | while read zip_file; do unzip -o "\$zip_file" -d "\$(dirname "\$zip_file")"; done ]]> </command> <inputs> <param name="accession" type="text" label="The accession ID of BioImages-Core or BioStudies-JCB" help="for eg. S-BIAD570, S-JCBD-201309038"/> <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> <collection name="tiff_images" type="list" label="${tool.name} on ${on_string}: TIFF Images"> <discover_datasets pattern="(?P<designation>.*)\.tiff" format="tiff" directory="ftp.ebi.ac.uk" recurse="true" /> <discover_datasets pattern="(?P<designation>.*)\.tif" format="tiff" directory="ftp.ebi.ac.uk" recurse="true" /> </collection> <collection name="png_images" type="list" label="${tool.name} on ${on_string}: PNG Images"> <discover_datasets pattern="(?P<designation>.*)\.png" format="png" directory="ftp.ebi.ac.uk" recurse="true" /> </collection> <collection name="jpg_images" type="list" label="${tool.name} on ${on_string}: JPG Images"> <discover_datasets pattern="(?P<designation>.*)\.jpg" format="jpg" directory="ftp.ebi.ac.uk" recurse="true" /> </collection> <data format="txt" name="ftplinks" from_work_dir="ftpLink.txt" label="${tool.name} on ${on_string}: FTP Links"> <filter>ftplink_output</filter> </data> </outputs> <tests> <test expect_num_outputs='3'> <param name="accession" value="S-BIAD961" /> <param name="ftplink_output" value="False" /> <output_collection name="tiff_images" type="list" count="1"> <element name="Study_Component-4_mznanog_mCherry-AAT"> <assert_contents><has_size value="14092624" /></assert_contents> </element> </output_collection> </test> <test expect_num_outputs='4'> <param name="accession" value="S-JCBD-201309038" /> <param name="ftplink_output" value="True" /> <output_collection name="tiff_images" type="list" count="2"> <element name="JCB_STIL_serial"> <assert_contents><has_size value="7446240" /></assert_contents> </element> <element name="Sir_JCB_STIL_serial"> <assert_contents><has_size value="7436060" /></assert_contents> </element> </output_collection> <output name="ftplinks" ftype="txt" file="ftpLink.txt" lines_diff="0" /> </test> <test expect_num_outputs='3'> <param name="accession" value="S-BSST564" /> <param name="ftplink_output" value="False" /> <output_collection name="jpg_images" type="list" count="4"> <element name="580-16_P0-2"> <assert_contents><has_size value="1026747" /></assert_contents> </element> </output_collection> </test> <test expect_num_outputs='3'> <param name="accession" value="S-BSST221" /> <param name="ftplink_output" value="False" /> <output_collection name="png_images" type="list" count="81"> <element name="d1 normalized_CXCL13"> <assert_contents><has_size value="1583299" /></assert_contents> </element> <element name="normalized_KI67"> <assert_contents><has_size value="1722406" /></assert_contents> </element> </output_collection> </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. The tools currently supports downloading TIFF, PNG and JPG formats that are supported by Galaxy. ]]> </help> <expand macro="citations" /> </tool>