view data_manager/plasmidfinder_fetch_database.xml @ 1:9ef108e34063 draft

planemo upload commit 32f035f6404452fc8a1cf01d71be3c0b46548338
author pimarin
date Wed, 15 Feb 2023 10:35:15 +0000
parents 8ad77a9dc91d
children bd56ac4cca16
line wrap: on
line source


<tool id="data_manager_fetch_plasmidfinder" name="plasmidfinder_datamanager" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>plasmidfinder database builder</description>
    <macros>
        <import>macro.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code">
      <![CDATA[
        python '$__tool_directory__/plasmidfinder_fetch_database.py'
        --db_version '$database_select'
        '$output_file'
      ]]></command>
    <inputs>
        <param name="database_select" type="select" label="Database version" help="Choose a database version to download (default latest version)">
            <option value="latest" selected="true">Latest available version</option>
            <option value="2.1">V2.1_2019-08-28</option>
        </param>param>
    </inputs>
    <outputs>
        <data name="output_file" format="data_manager_json"/>
    </outputs>
    <tests>
        <!-- Test_1 DB latest -->
        <test expect_num_outputs="1">
            <param name="database_select" value="latest"/>
            <output name="output_file" value="plasmidfinder_test_data_manager_latest.json">
                <assert_contents>
                    <has_text_matching expression='\{"data_tables":\ \{\"plasmidfinder_database\"\:\ \[\{\"date\"\:\ \"\d\d\d\d\w\d\d\w\d\d\", \"name\"\: \"\w\w\w\w\w\w\w\w\w\w\w\w\d\d\d\d-\d\d-\d\d\",\ \"path\"\:\ \"plasmidfinder-db\",\ \"value\"\:\ \"plasmidfinder_\w\w\w\w\w\w\w\w\w\w\w_\d\d\d\d-\d\d-\d\d\"' />
                </assert_contents>
            </output>
        </test>
         <!-- Test_2 DB 2.1 -->
        <test expect_num_outputs="1">
            <param name="database_select" value="2.1"/>
            <output name="output_file" value="plasmidfinder_test_data_manager_2.1.json">
                <assert_contents>
                    <has_text_matching expression='"data_tables": \{"plasmidfinder_database": \[\{"date": "\d\d\d\\d-\d\d-\d\d", "name": "2\.1_\d\d\d\d-\d\d-\d\d", "path": "plasmidfinder-db", "value": "plasmidfinder_\w\w\w\w\w\w\w\w\w\w\w\w_\d\d\d\d-\d\d-\d\d"' />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
        Download plasmidfinder database from the bitbucket repository
    ]]></help>
    <citations>
        <citation type="doi">10.1007/978-1-4939-9877-7_20</citation>
    </citations>
</tool>