view mitos.xml @ 5:8b08ea650060 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mitos commit 2d87b0b9c2491ed6fc611b6820b5ebea1d6def23
author iuc
date Fri, 19 Jan 2024 21:29:40 +0000
parents c7553ba39670
children ca1142e5df8b
line wrap: on
line source

<tool id="mitos" name="@MITOS_NAME@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>de-novo annotation of metazoan mitochondrial genomes</description>
  <macros>
    <import>macros.xml</import>
    <token name="@MITOS_NAME@">MITOS</token>
    <token name="@TOOL_VERSION@">1.1.4</token>
    <token name="@VERSION_SUFFIX@">0</token>
  </macros>
  <xrefs>
      <xref type='bio.tools'>mitos</xref>
  </xrefs>
  <requirements>
    <requirement type="package" version="@TOOL_VERSION@">mitos</requirement>
  </requirements>
  <version_command>python -c "import mitos; print(mitos.__version__)"</version_command>
  <command detect_errors="aggressive"><![CDATA[
mkdir outdir &&

runmitos.py
--input '$input'
--code $code
--outdir outdir
--refdir '$refdir.fields.path'
#for tpe in  ["prot", "trna", "rrna"]
  #if not $tpe in str($advanced.featuretypes).split(',')
    --no$tpe
  #end if
#end for
--finovl $advanced.finovl
--evalue $advanced_prot.evalue
--cutoff $advanced_prot.cutoff
#set maxovl=float($advanced_prot.maxovl)/100.0
--maxovl $maxovl
--clipfac $advanced_prot.clipfac
#set fragovl=float($advanced_prot.fragovl)/100.0
--fragovl $fragovl
--fragfac $advanced_prot.fragfac
--ststrange $advanced_prot.ststrange
#if "raw" in str($addoutputs).split(','):
  --zip
#end if
  ]]></command>
  <inputs>
    <param argument="--input" label="sequence" type="data" format="fasta" help="a single sequence in fasta formated sequence">
      <validator type="dataset_metadata_in_range" metadata_name="sequences" min="1" max="1"/>
    </param> 
    <param argument="--code" label="Genetic code" type="select">
      <option value="2">Vertebrate (2)</option>
      <option value="4">Mold, Protozoan, Coelenteral (4)</option>
      <option value="5">Invertebrate (5)</option>
      <option value="9">Echinoderm, Flatworm (9)</option>
      <option value="13">Ascidian (13)</option>
      <option value="14">Alternative Flatworm (14)</option>
    </param>
    <param argument="--refdir" label="Reference data" type="select" help="contact the administrator of this Galaxy instance if you miss reference data">
        <options from_data_table="mitos">
          <filter type="static_value" value="mitos" column="2"/>
        </options>
        <validator message="No reference annotation is available for MITOS" type="no_options" />
    </param>
    <param name="addoutputs" type="select" multiple="true" label="Outputs">
      <option value="bed" selected="true">BED</option>
      <option value="mito" selected="false">mito</option>
      <option value="gff" selected="false">GFF file</option>
      <option value="seq" selected="false">SEQ</option>
      <option value="fas" selected="false">nucleotide FASTA</option>
      <option value="faa" selected="false">protein FASTA</option>
      <option value="geneorder" selected="false">geneorder</option>
      <option value="protein_plot" selected="false">Protein prediction plot</option>
      <option value="ncRNA_plot" selected="false">ncRNA prediction plot</option>
      <!--<option value="ncRNA_structure_ps_plots" selected="false">ncRNA structure plots - postscript</option>-->
      <option value="ncRNA_structure_svg_plots" selected="false">ncRNA structure plots - svg</option>
      <option value="raw" selected="false">zipped raw results</option>
    </param>
    <section name="advanced" title="Advanced options">
      <param name="featuretypes" label="Feature types" help="Feature types that should be predicted by MITOS (--noprot,--notrna,--norrna)" type="select" multiple="true">
        <option value="prot" selected="true">Protein coding genes</option>
        <option value="trna" selected="true">tRNAs</option>
        <option value="rrna" selected="true">rRNAs</option>
      </param>
      <param argument="--finovl" label="Final overlap (nt)" help="Maximum number of nucleotides by which genes of different types may overlap" type="integer" value="35" min="0"/>
    </section>
    <section name="advanced_prot" title="Advanced options for protein coding gene prediction">
      <param argument="--evalue" label="BLAST E-value Exponent" help="Negation of the exponent of the E-value threshold used by BLAST, i.e. a value X gives an E-value of 10^(-X)" type="float" value="2" min="0"/>
      <param argument="--cutoff" label="Quality cutoff" help="Minimum allowed quality in % of the maximum quality value per reading frame" type="integer" value="50" min="0" max="100"/>
      <param argument="--maxovl" label="Maximum overlap" help="Maximum allowed overlap of proteins in percent of the smaller feature " type="integer" value="20" min="0" max="100"/>
      <param argument="--clipfac" label="Clipping factor" help="Clip overlapping proteins with the same name that differ by less than the specified factor" type="float" value="10" min="0"/>
      <param argument="--fragovl" label="Fragment overlap" help="Maximum allowed overlap of proteins in the query (in percent of the shorter query range) for two hits to be counted as fragments of the same gene" type="integer" value="20" min="0" max="100"/>
      <param argument="--fragfac" label="Fragment quality factor" help="Maximum factor by which fragments of the same protein may differ in their quality" type="float" value="10"/>
      <param argument="--ststrange" label="Start/stop range" help="Number of aminoacids searched for start and stop codon of proteins" type="integer" value="6"/>
    </section>
  </inputs>
  <outputs>
    <data name="bedout" format="bed" from_work_dir="outdir/result.bed">
      <filter>"bed" in str(addoutputs)</filter>
    </data>
    <data name="mitoout" format="tabular" from_work_dir="outdir/result" label="${tool.name} on ${on_string}: mito">
      <filter>"mito" in str(addoutputs)</filter>
    </data>
    <data name="gffout" format="gff" from_work_dir="outdir/result.gff" label="${tool.name} on ${on_string}: GFF">
      <filter>"gff" in str(addoutputs)</filter>
    </data>
    <data name="seqout" format="txt" from_work_dir="outdir/result.seq" label="${tool.name} on ${on_string}: TBL">
      <filter>"seq" in str(addoutputs)</filter>
    </data>
    <data name="fasout" format="fasta" from_work_dir="outdir/result.fas" label="${tool.name} on ${on_string}: nt FASTA">
      <filter>"fas" in str(addoutputs)</filter>
    </data>
    <data name="faaout" format="fasta" from_work_dir="outdir/result.faa" label="${tool.name} on ${on_string}: aa FASTA">
      <filter>"faa" in str(addoutputs)</filter>
    </data>
    <data name="geneorderout" format="fasta" from_work_dir="outdir/result.geneorder" label="${tool.name} on ${on_string}: geneorder">
      <filter>"geneorder" in str(addoutputs)</filter>
    </data>
    <data name="protein_plot_out" format="pdf" from_work_dir="outdir/plots/prot.pdf" label="${tool.name} on ${on_string}: Protein prediction plot">
      <filter>"protein_plot" in str(addoutputs)</filter>
    </data>
    <data name="ncRNA_plot_out" format="pdf" from_work_dir="outdir/plots/rna.pdf" label="${tool.name} on ${on_string}: ncRNA prediction plot">
      <filter>"protein_plot" in str(addoutputs)</filter>
    </data>
    <collection name="ncRNA_structure_plot_svg_out" type="list" label="${tool.name} on ${on_string}: ncRNA svg structure plots">
      <discover_datasets pattern="(?P&lt;name&gt;.+)\.svg" format="svg" directory="outdir/plots" />
      <filter>"ncRNA_structure_svg_plots" in str(addoutputs)</filter>
    </collection>
    <data name="rawout" format="zip" from_work_dir="outdir.zip" label="${tool.name} on ${on_string}: raw data">
      <filter>"raw" in str(addoutputs)</filter>
    </data>
  </outputs>
  <tests>
    <!-- default options -->
    <test expect_num_outputs="1">
      <param name="input" value="NC_012920.fasta"/>
      <param name="code" value="2"/>
      <param name="refdir" value="mitos1-refdata" />
      <output name="bedout" file="NC_012920.bed" ftype="bed"/>
      <assert_command>
        <has_text text="--code 2"/>
        <has_text text="--finovl 35"/>
        <has_text text="--evalue 2.0"/>
        <has_text text="--cutoff 50"/>
        <has_text text="--maxovl 0.2"/>
        <has_text text="--clipfac 10.0"/>
        <has_text text="--fragovl 0.2"/>
        <has_text text="--fragfac 10.0"/>
        <has_text text="--ststrange 6"/>
      </assert_command>
    </test>
    <!-- default options, add outputs -->
    <test expect_num_outputs="11">
      <param name="input" value="NC_012920.fasta"/>
      <param name="code" value="2"/>
      <param name="refdir" value="mitos1-refdata" />
      <param name="addoutputs" value="bed,mito,gff,seq,fas,faa,raw,geneorder,protein_plot,ncRNA_plot,ncRNA_structure_svg_plots"/>
      <output name="bedout" file="NC_012920.bed" ftype="bed"/>
      <output name="mitoout" file="NC_012920.mito" ftype="tabular" />
      <output name="gffout" file="NC_012920.gff" ftype="gff" />
      <output name="seqout" file="NC_012920.seq" ftype="txt" />
      <output name="fasout" file="NC_012920.fas" ftype="fasta" />
      <output name="faaout" file="NC_012920.faa" ftype="fasta" />
      <output name="rawout" ftype="zip">
          <assert_contents>
              <has_archive_member path="result.bed"/>
          </assert_contents>
      </output>
      <output name="geneorderout" file="NC_012920.geneorder" ftype="fasta" />
      <output name="protein_plot_out" file="NC_012920_prot.pdf" ftype="pdf" compare="sim_size"/>
      <output name="ncRNA_plot_out" file="NC_012920_ncrna.pdf" ftype="pdf" compare="sim_size"/>
      <output_collection name="ncRNA_structure_plot_svg_out" type="list" count="24">
         <element name="trnA-5586-5654" ftype="svg">
          <assert_contents>
            <has_text text="&lt;svg"/>
            <has_size min="100"/>
          </assert_contents>
         </element>
      </output_collection>
      <assert_command>
        <has_text text="--code 2"/>
        <has_text text="--finovl 35"/>
        <has_text text="--evalue 2.0"/>
        <has_text text="--cutoff 50"/>
        <has_text text="--maxovl 0.2"/>
        <has_text text="--clipfac 10.0"/>
        <has_text text="--fragovl 0.2"/>
        <has_text text="--fragfac 10.0"/>
        <has_text text="--ststrange 6"/>
      </assert_command>
    </test>
    <!-- no rRNA, and advanced options -->
    <test expect_num_outputs="1">
      <param name="input" value="NC_012920.fasta"/>
      <param name="code" value="2"/>
      <param name="refdir" value="mitos1-refdata" />
      <param name="advanced|featuretypes" value="prot,trna" />
      <param name="advanced|finovl" value="50" />
      <output name="bedout" file="NC_012920.bed" ftype="bed" compare="sim_size"/>
      <assert_command>
        <has_text text="--code 2"/>
        <has_text text="--norrna"/>
        <has_text text="--finovl 50"/>
      </assert_command>
    </test>
    <!-- no rRNA, no tRNA; advanced protein options -->
    <test expect_num_outputs="1">
      <param name="input" value="NC_012920.fasta"/>
      <param name="code" value="5"/>
      <param name="refdir" value="mitos1-refdata" />
      <param name="advanced|featuretypes" value="prot" />
      <param name="advanced_prot|evalue" value="3"/>
      <param name="advanced_prot|cutoff" value="40"/>
      <param name="advanced_prot|maxovl" value="30"/>
      <param name="advanced_prot|clipfac" value="5"/>
      <param name="advanced_prot|fragovl" value="15"/>
      <param name="advanced_prot|fragfac" value="11"/>
      <param name="advanced_prot|ststrange" value="12"/>
      <param name="addoutputs" value="bed"/>
      <output name="bedout" file="NC_012920.bed" ftype="bed" compare="sim_size"/>
      <assert_command>
        <has_text text="--code 5"/>
        <has_text text="--evalue 3"/>
        <has_text text="--cutoff 40"/>
        <has_text text="--maxovl 0.3"/>
        <has_text text="--clipfac 5.0"/>
        <has_text text="--fragovl 0.15"/>
        <has_text text="--fragfac 11.0"/>
        <has_text text="--ststrange 12"/>
      </assert_command>
    </test>
  </tests>
  <help>
    @COMMON_HELP@
  <![CDATA[
  ]]></help>
  <citations>
    <citation type="doi">10.1016/j.ympev.2012.08.023</citation>
  </citations>
</tool>