Mercurial > repos > iuc > checkm2_build_database
changeset 0:4abc306ec842 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_checkm2 commit f02ef28c39a18da4afb9148d0342244f6788485a
author | iuc |
---|---|
date | Tue, 14 Jan 2025 20:27:00 +0000 |
parents | |
children | 64630d815957 |
files | data_manager/checkm2_datamanager.xml data_manager_conf.xml test-data/checkm2.loc tool-data/checkm2.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test |
diffstat | 6 files changed, 114 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/checkm2_datamanager.xml Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,62 @@ +<tool id="checkm2_build_database" name="CheckM2" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description>database builder</description> + <macros> + <!-- on update run a local test setting `test` to something else than "true" --> + <token name="@TOOL_VERSION@">1.0.2</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@PROFILE@">23.1</token> + </macros> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">checkm2</requirement> + </requirements> + <version_command>checkm2 --version</version_command> + <command detect_errors="exit_code"><![CDATA[ + mkdir -p '$out_file.extra_files_path' && + #if $test != "true" + checkm2 database --download --path '$out_file.extra_files_path'/ && + mv '$out_file.extra_files_path'/CheckM2_database/uniref100.KO.1.dmnd '$out_file.extra_files_path' && + #else + touch '$out_file.extra_files_path'/uniref100.KO.1.dmnd && + #end if + cp '$dmjson' '$out_file' + ]]></command> + <configfiles> + <configfile name="dmjson"><![CDATA[ +{ + "data_tables":{ + "checkm2":[ + { + "path":"uniref100.KO.1.dmnd", + "name":"CheckM2 diamond DB downloaded with version @TOOL_VERSION@", + "version":"@TOOL_VERSION@", + "value":"@TOOL_VERSION@" + } + ] + } +}]]> + </configfile> + </configfiles> + <inputs> + <param name="test" type="hidden"/> + </inputs> + <outputs> + <data name="out_file" format="data_manager_json" /> + </outputs> + <tests> + <test expect_num_outputs="1"> + <param name="test" value="true"/> + <output name="out_file"> + <assert_contents> + <has_text text='"value":"@TOOL_VERSION@"'/> + <has_text text='"name":"CheckM2 diamond DB downloaded with version @TOOL_VERSION@"'/> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +Download and extract CheckM2 reference data. + ]]></help> + <citations> + <citation type="doi">10.1038/s41592-023-01940-w</citation> + </citations> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager_conf.xml Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,19 @@ +<data_managers> + <data_manager tool_file="data_manager/checkm2_datamanager.xml" id="checkm2_build_database"> + <data_table name="checkm2"> + <output> + <column name="value"/> + <column name="name"/> + <column name="version"/> + <column name="path" output_ref="out_file"> + <move type="file"> + <source>${path}</source> + <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">checkm2/${value}/${path}</target> + </move> + <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/checkm2/${value}/${path}</value_translation> + <value_translation type="function">abspath</value_translation> + </column> + </output> + </data_table> + </data_manager> +</data_managers> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/checkm2.loc Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,2 @@ + +1.0.2 CheckM2 diamond DB downloaded with version 1.0.2 1.0.2 /tmp/tmpf_hplx2a/galaxy-dev/tool-data/checkm2/1.0.2/uniref100.KO.1.dmnd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/checkm2.loc.sample Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,18 @@ +#This is a sample file distributed with Galaxy that enables tools +#to use a the checkm2 dabase. +#You will need to create these data files using the following command + +#checkm2 database --download --path /custom/path/ + +#and then create a checkm2_db_versioned.loc file similar to this one (store it in this +#directory) that points to the directories in which those files are stored. + +#The checkm2_db_versioned.loc file has this format (longer white space +#characters are TAB characters): +# +#<unique_build_id> <display_name> <version> <file_base_path> + +#The <version> column indicates the checkm2 version that generated the database + +# +#diamond_db_1.0.2 Diamond database 1.0.2 /mnt/galaxyIndices/Checkm2_database/uniref100.KO.1.dmnd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,6 @@ +<tables> + <table name="checkm2" comment_char="#" allow_duplicate_entries="False"> + <columns>value, dbkey, name, version, path</columns> + <file path="tool-data/checkm2.loc" /> + </table> +</tables> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Tue Jan 14 20:27:00 2025 +0000 @@ -0,0 +1,7 @@ +<tables> + <!-- Location of rnastar indexes for testing --> + <table name="checkm2" comment_char="#" allow_duplicate_entries="False"> + <columns>value, dbkey, name, version, path</columns> + <file path="${__HERE__}/test-data/checkm2.loc" /> + </table> +</tables> \ No newline at end of file