Mercurial > repos > iuc > data_manager_fetch_busco
diff data_manager/busco_fetcher.xml @ 8:29548c43fb33 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_busco/ commit 32f1099f18b41bf1efd1a039daf732809c77269e
author | iuc |
---|---|
date | Tue, 22 Apr 2025 13:11:38 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/busco_fetcher.xml Tue Apr 22 13:11:38 2025 +0000 @@ -0,0 +1,74 @@ +<tool id="busco_fetcher" name="Busco" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" tool_type="manage_data" profile="23.1"> + <description>dataset dowloader</description> + <macros> + <token name="@TOOL_VERSION@">5.8.0</token> + <token name="@VERSION_SUFFIX@">1</token> + </macros> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">busco</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + busco --download_path '$out_file.extra_files_path' --download '$lineage' && + ## remove unwanted lineage folders and placement files + ## https://gitlab.com/ezlab/busco/-/issues/784 + if [ -d '$out_file.extra_files_path'/lineages ]; then + find '$out_file.extra_files_path'/lineages/ -mindepth 1 -maxdepth 1 ! -name '*_$datasets_version*' -exec rm -rf {} \;; + fi && + if [ -d '$out_file.extra_files_path'/placement_files ]; then + find '$out_file.extra_files_path'/placement_files/ -mindepth 1 -maxdepth 1 ! -name '*_$datasets_version*' -delete; + fi && + ## unpack faa.gz files ready to use + ## https://gitlab.com/ezlab/busco/-/issues/789 + if [ -d '$out_file.extra_files_path'/lineages ]; then + find '$out_file.extra_files_path'/lineages/ -name "*.faa.gz" -exec gunzip {} \;; + fi + && cp '$dmjson' '$out_file' + ]]></command> + <configfiles> + <configfile name="dmjson"><![CDATA[ +#from datetime import datetime + { + "data_tables":{ + "busco_database":[ + { + "value":"$lineage $datasets_version #echo datetime.now().strftime('%Y-%m-%d-%H%M%S')#", + "name":"$lineage $datasets_version #echo datetime.now().strftime('%Y-%m-%d-%H%M%S')#", + "version":"@TOOL_VERSION@", + "path":"$out_file.extra_files_path" + } + ] + } + }]]> + </configfile> + </configfiles> + <inputs> + <param name="lineage" argument="--download" type="select" label="Select the lineage to be downloaded"> + <option value="all">All</option> + <option value="prokaryota">Prokaryota</option> + <option value="eukaryota">Eukaryota</option> + <option value="virus">Virus</option> + </param> + <param argument="--datasets_version" type="select" label="OrthoDB version" help="By March 2025 OrthoDB 12 datasets were only available for Prokaryota (https://busco-data2.ezlab.org/v5/data/)"> + <option value="odb10" selected="true">OrthoDB 10</option> + <option value="odb12">OrthoDB 12</option> + </param> + </inputs> + <outputs> + <data name="out_file" format="data_manager_json" label="BUSCO data manager: JSON"/> + </outputs> + <tests> + <test expect_num_outputs="1"> + <param name="lineage" value="virus"/> + <output name="out_file"> + <assert_contents> + <has_text text="virus"/> + <has_text text="5.8.0"/> + </assert_contents> + </output> + </test> + </tests> + <help>This tool downloads the BUSCO databases.</help> + <citations> + <citation type="doi">10.1093/bioinformatics/btv351</citation> + </citations> +</tool>