view screen_abricate_report.xml @ 4:22247b1a59d5 draft default tip

"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/blob/master/tools/screen_abricate_report commit ae10b1f55b2356bea735a994619288f7575430cb"
author public-health-bioinformatics
date Fri, 03 Jan 2020 14:30:22 -0500
parents 2262e531c50b
children
line wrap: on
line source

<tool id="screen_abricate_report" name="Screen Abricate Report" version="0.4.0+galaxy0">
    <description>Screens an abricate report for genes of interest</description>
    <requirements>
    </requirements>
    <version_command><![CDATA[screen_abricate_report.py --version]]></version_command>
    <command detect_errors="exit_code"><![CDATA[
        '${__tool_directory__}/screen_abricate_report.py'
             '${abricate_report}'
             #if str( $screening_file_source.screening_file_source_selector ) == "tool_data_table":
               #set $input_screening_file = str( $screening_file_source.screening_file.fields.path )
             #else:
               #set $input_screening_file = str( $screening_file_source.screening_file )
             #end if
             --screening_file '${input_screening_file}'
             --screened_report '${screened_report}'
             --gene_detection_status '${gene_detection_status}'
             --min_coverage '${min_coverage}'
             --min_identity '${min_identity}' &&
             cp '${input_screening_file}' '${output_screening_file}'
    ]]></command>
    <inputs>
        <conditional name="screening_file_source">
            <param name="screening_file_source_selector" type="select" label="Select a gene screening file from your history or use one from a tool data table?"
                   help="Screening files must be stored in the 'abricate_report_screening_files' tool data table">
                <option value="tool_data_table">From tool data table</option>
                <option value="history">From history</option>
            </param>
            <when value="tool_data_table">
                <param name="screening_file" type="select" format="tabular">
	            <options from_data_table="abricate_report_screening_files">
	                <validator type="no_options" message="No abricate report screening files are available" />
                    </options>
	        </param>
            </when>
            <when value="history">
                <param name="screening_file" type="data" format="tabular" label="Gene screening file" help="A two-column tab-delimited file with gene names and regular expressions" />
            </when>
        </conditional>
        <param name="abricate_report" type="data" format="tabular" />
        <param name="min_coverage" type="float" min="0.0" value="90.0" max="100.0" />
        <param name="min_identity" type="float" min="0.0" value="90.0" max="100.0" />
    </inputs>
    <outputs>
        <data name="screened_report" format="tabular" label="Screened Abricate Report" />
        <data name="gene_detection_status" format="tabular" label="Gene Detection Status" />
        <data name="output_screening_file" format="tabular" />
    </outputs>
    <tests>
        <test>
            <param name="screening_file_source.screening_file_source_selector" value="tool_data_table" />
            <param name="screening_file_source.screening_file" value="test_entry"/>
            <param name="abricate_report" value="SAMN13042171-abricate_report_full.tsv"/>
	    <output name="screened_report" file="SAMN13042171-abricate_report_screened.tsv" ftype="tabular"/>
	    <output name="gene_detection_status" file="SAMN13042171-gene_detection_status.tsv" ftype="tabular"/>
        </test>
        <test>
            <param name="screening_file_source.screening_file_source_selector" value="history" />
            <param name="screening_file_source.screening_file" value="screening_file.tsv"/>
            <param name="abricate_report" value="SAMN13042171-abricate_report_full.tsv"/>
	    <output name="screened_report" file="SAMN13042171-abricate_report_screened.tsv" ftype="tabular"/>
	    <output name="gene_detection_status" file="SAMN13042171-gene_detection_status.tsv" ftype="tabular"/>
        </test>
        <test>
            <param name="screening_file_source.screening_file_source_selector" value="history" />
            <param name="screening_file_source.screening_file" value="screening_file.tsv"/>
            <param name="abricate_report" value="SAMN11840202-abricate_report_full.tsv"/>
	    <output name="screened_report" file="SAMN11840202-abricate_report_screened.tsv" ftype="tabular"/>
	    <output name="gene_detection_status" file="SAMN11840202-gene_detection_status.tsv" ftype="tabular"/>
        </test>
        <test>
            <param name="screening_file_source.screening_file_source_selector" value="history" />
            <param name="screening_file_source.screening_file" value="screening_file.tsv"/>
            <param name="abricate_report" value="SAMN11840203-abricate_report_full.tsv"/>
	    <output name="screened_report" file="SAMN11840203-abricate_report_screened.tsv" ftype="tabular"/>
	    <output name="gene_detection_status" file="SAMN11840203-gene_detection_status.tsv" ftype="tabular"/>
        </test>
    </tests>
    <help><![CDATA[
    This tool is used to filter (ie. 'screen') an abricate report to only include 
    specific genes of interest. 

    A list of genes is supplied in a 'screening file', which is a two-column .tsv 
    with headers 'gene_name' and 'regex'. The first column gives the name of the 
    gene of interest, and the second column is a regular expression that can be used 
    to identify examples of that gene in the 'GENE' column of the abricate report.

    For example, one might use the regex '^KPC-\d+$' to identify all alleles of the
    KPC gene (KPC-2, KPC-3, KPC-4, ..., KPC-10, ...)
    ]]></help>
    <citations>
    </citations>
</tool>