view get_length_and_gc_content.xml @ 10:f7f3f7db2d4a draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/goseq_1_22_0 commit 6574ffcb63770ff8de2d496894292cb7ce0492a8-dirty
author mvdbeek
date Thu, 31 Mar 2016 12:30:01 -0400
parents 0e9424413ab0
children
line wrap: on
line source

<tool id="length_and_gc_content" name="gene length and gc content" version="0.1.0">
    <description>from GTF file</description>
    <macros>
        <import>go_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <command interpreter="Rscript">
        get_length_and_gc_content.r --gtf "$gtf"
        #if $fastaSource.genomeSource == "indexed":
            --fasta "$fastaSource.fasta_pre_installed.fields.path"
        #else:
            --fasta "$fastaSource.fasta_history"
        #end if
        --length "$length"
        --gc_content "$gc_content"
    </command>
    <inputs>
        <param help="The GTF must match the FASTA file" label="GTF file for length and GC calculation" name="gtf" type="data" format="gtf" />
        <conditional name="fastaSource">
            <param help="choose history if you don't see the correct genome fasta" label="Select a reference fasta from your history or use a built-in fasta?" name="genomeSource" type="select">
                <option value="indexed">Use a built-in fasta</option>
                <option value="history">Use fasta from history</option>
            </param>
        <when value="indexed">
            <param help="Select the fasta file from a list of pre-installed genomes" label="Select a fasta sequence" name="fasta_pre_installed" type="select">
              <options from_data_table="all_fasta"/>
            </param>
        </when>
        <when value="history">
            <param format="fasta" label="Select a fasta file that matches the supplied GTF file" name="fasta_history" type="data" />
        </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" label="gene length" name="length">
            <!-- future: set this when 16.04 has been released
            <actions>
                <action name="column_names" type="metadata" default="gene,length" />
            </actions>
            -->
        </data>
        <data format="tabular" label="gene gc content" name="gc_content">
            <!-- future: set this when 16.04 has been released
             <actions>
                <action name="column_names" type="metadata" default="gene,gc_content" />
            </actions>
            -->
        </data>
    </outputs>
    <tests>
        <test>
            <param name="gtf" value="in.gtf" ftype="gtf"></param>
            <param name="fastaSource|genomeSource" value="history"></param>
            <param name="fastaSource|fasta_history" value="in.fasta" ftype="fasta"></param>
            <output name="length" file="length.tab"></output>
            <output name="gc_content" file="gc.tab"></output>
        </test>
    </tests>
    <help>

        **What it does**

        Returns a tabular file with gene id and length and a tabular file with gene id and GC content, based on a supplied GTF and a FASTA file.


        </help>
    <citations>
    </citations>
</tool>