view gff_feature_colours.xml @ 1:4f0fb855276c draft default tip

planemo upload for repository https://github.com/portiahollyoak/Tools commit 5f5802314b55f52ea4b3f9f515ec46a5a770696d-dirty
author portiahollyoak
date Thu, 26 May 2016 11:07:21 -0400
parents f562c252b285
children
line wrap: on
line source

<tool id="gff_feature_colours" name="Add Feature Colours to GFF" version="0.1.0">
    <requirements>
    </requirements>
    <stdio>
        <exit_code range="1:" />
    </stdio>
    <command><![CDATA[
        python "$__tool_directory__"/add_colour.py
        --input $input
        --features
        #for feature in $feat
            "${feature.feature}"
        #end for
        --colours
        #for feature in $feat
            "${feature.feature_colour.value}"
        #end for
        --output $output
    ]]></command>
    <inputs>
        <param name="input" type="data" format="gff,gtf" label="Dataset"/>
        <repeat name="feat" title="Feature to assign a colour">
            <param name="feature" type="select">
                <options from_dataset="input">
                    <column name="name" index="2"/>
                    <column name="value" index="2"/>
                    <filter type="unique_value" ref="input" column="2" />
                </options>
            </param>
            <param name="feature_colour" type="color" label="Feature Colour" value="#ff00ff"/>
        </repeat>
    </inputs>
    <outputs>
        <data format_source="input" name="output" label="Add feature colours to ${input.element_identifier}" />
    </outputs>
    <tests>
        <test>
            <param name="input" value="test-gff.gff" ftype="gff"/>
            <param name="feat_0|feature" value="Idefix" />
            <param name="feat_0|feature_colour" value="#ff0000"/>
            <param name="feat_1|feature" value="INE-1" />
            <param name="feat_1|feature_colour" value="#00ff00"/>
            <output name="output" file="test-gff-colours.gff" ftype="gff"/>
        </test>
    </tests>>
    <help><![CDATA[
Description
------------

The Add Feature Colours tool allows the user to assign a colour to unique features found in the 3rd column of a GFF file for visualisation in a genome browser. It works by allowing the user to match unique features to a colour and then it will add the assigned colour of that feature to the 9th column of the feature line. This will then be interpreted by the genome browser, and the feature will appear in its assigned colour.

Example
----------------
Input:

211000022278978	DHGP    Bari1    515    2242    .    +    .     ID=RR41606_transposable_element;


Output:

211000022278978	DHGP    Bari1    515    2242    .    +    .     ID=RR41606_transposable_element;Colour=#ff00ff;
    ]]></help>
</tool>