view lorikeet.xml @ 2:da22667725c7 draft default tip

planemo upload for repository https://github.com/AbeelLab/lorikeet commit 20b560d28599c597257dbc77f8f38217cd61ae46
author iuc
date Tue, 12 Mar 2024 11:22:08 +0000
parents f9c37d0b3002
children
line wrap: on
line source

<tool id="lorikeet_spoligotype" name="lorikeet spoligotyping" version="@TOOL_VERSION@+galaxy0" profile="17.01">
  <description>M. tuberculosis DNA fingerprinting</description>

  <macros>
    <token name="@TOOL_VERSION@">20</token>
  </macros>
  <xrefs>
    <xref type="bio.tools">lorikeet</xref>
  </xrefs>
  <requirements>
    <requirement type="package" version="@TOOL_VERSION@">lorikeet</requirement>
  </requirements>

  <command detect_errors="exit_code"><![CDATA[
    #set $input_file = 'input.' + $input.extension
    ln -s '${input}' $input_file &&
    lorikeet spoligotype
    -o '${output_txt}'
    $input_file
    #if $spacer_source.source_type == 'file':
    -s '${spacer_source.spacer}'
    #end if
    ]]>
  </command>
  <inputs>
    <param name="input" label="Input sequences" type="data" format="bam,fastq,fastq.gz" help="Reads of sample(s) being spoligotyped" />
    <conditional name="spacer_source">
      <param type="select" name="source_type" label="Source for spacer sequences">
        <option selected="true" value="builtin">Built-in</option>
        <option value="file">File with custom spacers</option>
      </param>
      <when value="builtin">
      </when>
      <when value="file">
        <param argument="--spacer" type="data" format="fasta" label="Spacer file" help="FASTA format file containing customer spacer library" />
      </when>
    </conditional>
  </inputs>
  <outputs>
    <data name="output_txt" format="txt" label="Spoligotype on ${on_string}" />
  </outputs>
  <tests>
    <test>
      <param name="input" value="input.bam" ftype="bam" />
      <output name="output_txt">
        <assert_contents>
          <has_text text="1111111111 1111111011 1111111111 1100001111 111" />
        </assert_contents>
      </output>
    </test>
    <test>
      <param name="input" value="input.fastq" ftype="fastq" />
      <output name="output_txt">
        <assert_contents>
          <has_text text="1111111111 1111111011 1111111111 1100001111 111" />
        </assert_contents>
      </output>
    </test>
    <test>
      <param name="input" value="input.fastq.gz" ftype="fastq.gz" />
      <output name="output_txt">
        <assert_contents>
          <has_text text="1111111111 1111111011 1111111111 1100001111 111" />
        </assert_contents>
      </output>
    </test>
    <test>
      <param name="input" value="input.bam" ftype="bam" />
      <param name="source_type" value="file" />
      <param name="spacer" value="custom_spacers.fasta" ftype="fasta" />
      <output name="output_txt">
        <assert_contents>
          <has_text text="1111111111 0000000000 0000000000 0000000000 000" />
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[
Lorikeet_ is a tool for digital spoligotyping_ of M. tuberculosis strains
from Illumina data. Input is a file of Illumina reads and output is
a spoligotyping report.

While by default lorikeet uses its own built-in collection of spacer
sequences, a custom file of spacers can be provided if necessary.

.. _Lorikeet: https://github.com/AbeelLab/lorikeet
.. _spoligotyping: https://link.springer.com/protocol/10.1007%2F978-1-60327-999-4_10
    ]]>
  </help>
  <citations>
    <citation type="doi">10.1371/journal.pmed.1001880</citation>
  </citations>
</tool>