view mykrobe_parser.xml @ 5:deebc6410d13 draft

planemo upload for repository https://github.com/phac-nml/mykrobe-parser commit bbf7dd6b56e8ee77cff1f98a42a5abadd681b7ac
author nml
date Thu, 09 May 2019 14:16:34 -0400
parents 8529045f0fdf
children 8e7e5a660942
line wrap: on
line source

<tool id="mykrobe_parseR" name="mykrobe_parseR" version="0.1.4.1">
    <requirements>
        <requirement type="package" version="3.4.1">r-base</requirement>
        <requirement type="package" version="1.5.0">r-jsonlite</requirement>
        <requirement type="package" version="0.1.0">r-here</requirement>
        <requirement type="package" version="0.7.6">r-dplyr</requirement>
        <requirement type="package" version="0.2.5">r-purrr</requirement>
        <requirement type="package" version="0.8.1">r-tidyr</requirement>
        <requirement type="package" version="1.6.0">r-optparse</requirement>
	<requirement type="package" version="1.3.0">r-stringr</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[

	mkdir collection_files &&

        #for $file in $input
            ln -s "$file" collection_files/"$file.element_identifier".json &&
        #end for

        Rscript "$__tool_directory__/mykrobe_parser.R"

        -d "collection_files"

        #if $version
            -v "$version"
        #end if
        #if $depth
            -D "$depth"
        #end if
        #if $confidence
            -c "$confidence"
        #end if
        #if $run_name
            -n "$run_name"
        #end if

    ]]></command>
    <inputs>
    <param name="input"
        type="data" format="json,txt"
        optional="false"
        multiple="true"
        label="JSON File(s) (.JSON or .TXT)"/>
    <param name="version" type="text"
        argument="-v"
        optional="true"
        label="Mykrobe Workflow Version"/>
    <param name="depth" type="integer"
        argument="-D"
        optional="true"
        label="Minimum depth of coverage"
        help="Enter integer values only. Default is 5"/>
    <param name="confidence" type="integer"
        argument="-c"
        optional="true"
        label="Confidence"
        help="Minimum genotype confidence for variant genotyping. Enter integer values only. Default is 10"/>
    <param name="run_name" type="text"
        argument="-n"
        optional="true"
        label="Name of Run"/>
    </inputs>
    <outputs>
        <data name="output-jsondata" from_work_dir="output-jsondata.csv" format="csv" label="jsondata"/>
        <data name="output-report" from_work_dir="output-report.csv" format="csv" label="report"/>
    </outputs>
    <tests>
        <test>
		<param name="input" value="test-data.json"/>
		<output name="output-jsondata" ftype="csv" value="output-jsondata.csv" compare="sim_size"/>
        	<output name="output-report" ftype="csv" value="output-report.csv" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
==============
Mykrobe Parser
==============

R Script to parse the results of mykrobe predictor and present them in a LIMS compatible format.

=====
Legal 
=====

Copyright Government of Canada 2018

Written by: National Microbiology Laboratory, Public Health Agency of Canada

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this work except in compliance with the License. You may obtain a copy of the
License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

=======
Contact
=======

**Gary van Domselaar**: gary.vandomselaar@canada.ca

    ]]></help>
    <citations>
        <citation type="bibtex">@ARTICLE{a1,
            title = {R Script to parse the results of mykrobe predictor and present them in a LIMS compatible format.},
            author = {Adrian Zetner},
            url = {https://github.com/phac-nml/mykrobe-parser}
            }
        }</citation>
    </citations>
</tool>