view mykrobe_parser.xml @ 1:05ca0dbc9f46 draft

planemo upload for repository https://github.com/phac-nml/mykrobe-parser commit 2d42861c536b44c4fe00bef20c442c6cc0e987dd-dirty
author nml
date Mon, 01 Oct 2018 14:54:34 -0400
parents 6eae14751768
children f2608dccd3e0
line wrap: on
line source

<tool id="mykrobe_parseR" name="mykrobe_parseR" version="0.1.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[
        
        #if $input.type == 'collection'
            mkdir collection_files &&
            #for $file in $input.collection
                ln -s "$file" collection_files/"$file.element_identifier".json &&
            #end for
        #end if

        Rscript "$__tool_directory__/mykrobe_parser.R"

        #if $input.type =='single'
            -f "$input.single"
        #else
            -d "collection_files"
        #end if

        #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>
    <conditional name="input">
      <param name="type" type="select" label="Sequence Data Type">
        <option value="single">Single JSON File</option>
        <option value="collection">Collection of JSON Files</option>
      </param>
      <when value="single">
        <param name="single"
          type="data" format="json,txt"
          optional="false"
          label="Single JSON File (.JSON or .TXT)"
          />
      </when>
      <when value="collection">
        <param name="collection"
          type="data_collection" format="json,txt"
          optional="false"
          label="Collection of JSON Files (.JSON or .TXT)"
          />
      </when>
    </conditional>
    <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="type" value="single"/>
            <param name="single" ftype="json" 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>