view jcvi_gff_stats.xml @ 1:8cffbd184762 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jcvi_gff_stats commit 69b89d1e8d108e91c81099e5f922357183dc2490
author iuc
date Thu, 02 Aug 2018 12:31:05 -0400
parents 2defe48e4c7a
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="jcvi_gff_stats" name="Genome annotation statistics" profile="16.04" version="@VERSION@">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command><![CDATA[

        ln -s '${gff}' 'input.gff'

        &&

        python -m jcvi.annotation.stats genestats 'input.gff' > '${summary}'

        &&

        #if str($ref_genome.genome_type_select) == "indexed":
            python -m jcvi.annotation.stats summary 'input.gff' '${ref_genome.genome.fields.path}' 2>&1 | tail -n +3 >> '${summary}'
        #else
            python -m jcvi.annotation.stats summary 'input.gff' '${ref_genome.genome}' 2>&1 | tail -n +3 >> '${summary}'
        #end if

        &&

        python -m jcvi.annotation.stats stats 'input.gff' 2>&1 | grep Mean >> '${summary}'

        &&

        python -m jcvi.annotation.stats histogram 'input.gff'

        &&

        pdfunite *.input.pdf '${graphs}'
    ]]></command>
    <inputs>
        <param name="gff" type="data" format="gff" label="Annotation to analyse"/>
        <conditional name="ref_genome">
            <param label="Reference genome" name="genome_type_select" type="select">
                <option selected="True" value="indexed">Use a built-in genome</option>
                <option value="history">Use a genome from history</option>
            </param>
            <when value="indexed">
                <param
                  help="If your genome of interest is not listed, contact the Galaxy server administrators"
                  label="Select a reference genome"
                  name="genome"
                  type="select"
                  >
                    <options from_data_table="all_fasta">
                        <filter column="2" type="sort_by" />
                        <validator message="No genomes are available" type="no_options" />
                    </options>
                </param>
            </when>
            <when value="history">
                  <param name="genome" type="data" format="fasta" label="Corresponding genome sequence"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="txt" name="summary" label="${tool.name} on ${on_string}: summary"/>
        <data format="pdf" name="graphs" label="${tool.name} on ${on_string}: graphs"/>
    </outputs>
    <tests>
        <test>
            <param name="gff" value="annot.gff3"/>
            <conditional name="ref_genome">
                <param name="genome_type_select" value="history"/>
                <param name="genome" value="genome.fasta"/>
            </conditional>
            <output name="summary" file="summary.txt"/>
            <output name="graphs" file="all.pdf" compare="sim_size"/>
        </test>
        <test>
            <param name="gff" value="annot.gff3"/>
            <conditional name="ref_genome">
                <param name="genome_type_select" value="indexed"/>
                <param name="genome" value="merlin"/>
            </conditional>
            <output name="summary" file="summary.txt"/>
            <output name="graphs" file="all.pdf" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
        Based on JCVI Python utility libraries on genome assembly, annotation and comparative genomics.

        .. _JCVI Python utilities: https://github.com/tanghaibao/jcvi
    ]]></help>
    <expand macro="citations"/>
</tool>