view data_manager/pangolearn_dm.xml @ 2:ed7a967cb11b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_pangolearn commit 5401fea2353f59c3b401451fd93b22b7a5757fbc"
author iuc
date Thu, 03 Jun 2021 07:06:03 +0000
parents 112bb7a9da3c
children df30a2f1db55
line wrap: on
line source

<tool id="data_manager_pangolearn" name="PANGOlearn data manager" version="0.0.2" tool_type="manage_data" profile="20.01">
    <requirements>
        <requirement type="package" version="3.8">python</requirement>
        <requirement type="package" version="2.24.0">requests</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
    python '$__tool_directory__/pangolearn_dm.py'
        #if $release.which == "latest"
            --latest
        #else if $release.which == "date_range"
            #if str($release.start_date).strip() != ""
                --start_date '$release.start_date'
            #end if
            #if str($release.end_date).strip() != ""
                --end_date '$release.end_date'
            #end if
        #end if
        'pangolearn' 
        '${output_file}'
    ]]></command>
    <inputs>
        <conditional name="release">
            <param name="which" type="select" label="Select PANGOlearn release">
                <option value="latest" selected="true">Latest</option>
                <option value="date_range">Date range</option>
                <!-- <option value="history">From history</option> -->
            </param>
            <when value="latest">
            </when>
            <when value="date_range">
                <param name="start_date" type="text" label="Start date " help="Don't download models older than this date" optional="true">
                    <validator type="regex">\d{4}-\d{2}-\d{2}$</validator>
                </param>
                <param name="end_date" type="text" label="End date (YYYY-MM-DD)" help="Don't download models newer than this date" optional="true">
                    <validator type="regex">\d{4}-\d{2}-\d{2}$</validator>
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_file" format="data_manager_json"/>
    </outputs>
    <tests>
        <test>
            <conditional name="release">
                <param name="which" value="date_range" />
                <param name="start_date" value="2021-04-01" />
                <param name="end_date" value="2021-04-01" />
            </conditional>
            <output name="output_file">
                <assert_contents>
                    <has_text text="pangoLEARN data release 2021-04-01"/>
                    <has_text text='"format_version": "1.0"'/>
                </assert_contents>
            </output>        
        </test>
        <test>
            <conditional name="release">
                <param name="which" value="date_range" />
                <param name="start_date" value="2021-05-27" />
                <param name="end_date" value="2021-05-27" />
            </conditional>
            <output name="output_file">
                <assert_contents>
                    <has_text text='"format_version": "3.0"'/>
                </assert_contents>
            </output>        
        </test>        
    </tests>
    <help><![CDATA[
        This data managers fetches models (from the pangoLEARN_ repository) for the pangolin_
        SARS-CoV-2 lineage typing tool and updates the pangolearn data table.

        .. _pangoLEARN: https://github.com/cov-lineages/pangoLEARN
        .. _pangolin: https://github.com/cov-lineages/pangolin
    ]]></help>
    <citations>
        <citation type="bibtex">
            @unpublished{None,
            author = {Aine O'Tool},
            title = {pangoLEARN},
            year = {2020},
            eprint = {None},
            url = {https://github.com/cov-lineages/pangoLEARN}
        }</citation>
    </citations>
</tool>