view homer_gtf_to_annotation.xml @ 3:7c5da353e460 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/homer commit 16a919905f336e34e237388c1921d0f4f8a368af
author iuc
date Thu, 06 Apr 2023 16:23:06 +0000
parents 8ebb6520eef4
children
line wrap: on
line source

<tool id="homer_gtf_to_annotations" name="Converts GTF to Annotations file for Homer" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
## Run parseGTF.pl
parseGTF.pl $gtf_file ann
## Different options
$type
$id
$removeAccVer
$removeEnsemblVer
-annTSSstartOffset $annTSSstartOffset
-annTSSendOffset $annTSSendOffset
-annTTSstartOffset $annTTSstartOffset
-annTTSendOffset $annTTSendOffset
#if $features != 'None':
    #set features_space = ' '.join(str($features).split(','))
    -features $features_space
#end if
> annotations.txt &&
## Prioritize and add intergenic annotation
assignGenomeAnnotation annotations.txt annotations.txt -prioritize $output > $output_stats
        ]]></command>
    <inputs>
        <param name="gtf_file" type="data" format="gtf,gff,gff3" label="GTF file" help="Must be of datatype &quot;gtf&quot; or &quot;gff&quot; or &quot;gff3&quot;"/>
        <param name="type" type="select" label="Format of input file">
            <option value="">GTF</option>
            <option value="-gff">GFF (treats 9th column as ID)</option>
            <option value="-gff3">GFF3 (looks for parent attribute to assign gene name)</option>
        </param>
        <param name="id" type="select" label="Primary identifier">
            <option value="-tid">Transcript ID</option>
            <option value="-gid">Gene ID</option>
        </param>
        <param name="features" type="select" label="Which feature(s) to use?" multiple="true" display="checkboxes">
            <option value="exon" selected="true">exon</option>
            <option value="start_codon" selected="true">start_codon</option>
            <option value="stop_codon" selected="true">stop_codon</option>
        </param>
        <param name="removeAccVer" type="boolean" truevalue="-removeAccVer" falsevalue="" label="Remove any .1, .2, etc. at end of accession numbers, i.e. AT1G01040.2" help="-removeAccVer; Default=False"/>
        <param name="removeEnsemblVer" type="boolean" truevalue="-removeEnsemblVer" falsevalue="" label="Remove 'transcript:' and '_T01' style ids" help="-removeEnsemblVer; Default=False"/>
        <param name="annTSSstartOffset" type="integer" value="-1000" label="distance upstream of TSS to start promoter annotation" help="-annTSSstartOffset; Default=-1000"/>
        <param name="annTSSendOffset" type="integer" value="100" label="distance upstream/downstream of TSS to end promoter annotation" help="-annTSSendOffset; Default=100"/>
        <param name="annTTSstartOffset" type="integer" value="-100" label="distance upstream of TTS to start TTS annotation" help="-annTTSstartOffset; Default=-100"/>
        <param name="annTTSendOffset" type="integer" value="1000" label="distance upstream/downstream of TTS to end TTS annotation" help="-annTTSendOffset; Default=1000"/>
    </inputs>
    <outputs>
        <data format="tabular" name="output" label="${tool.name} on ${on_string}: Annotations"/>
        <data format="tabular" name="output_stats" label="${tool.name} on ${on_string}: Annotation stats"/>
    </outputs>
    <tests>
        <test>
            <!-- simple test with default -->
            <param name="gtf_file" value="small.gtf" ftype="gtf"/>
            <output name="output" file="annotations_default.txt" ftype="tabular"/>
            <output name="output_stats" file="annotations_default_stats.txt" ftype="tabular"/>
        </test>
        <test>
            <!-- simple test with default except no exon_end -->
            <param name="gtf_file" value="small.gtf" ftype="gtf"/>
            <param name="features" value="exon,start_codon"/>
            <output name="output" file="annotations_exon_start.txt" ftype="tabular"/>
            <output name="output_stats" file="annotations_exon_start_stats.txt" ftype="tabular"/>
        </test>
        <test>
            <!-- simple test with default smaller TSS TTS -->
            <param name="gtf_file" value="small.gtf" ftype="gtf"/>
            <param name="annTSSstartOffset" value="-50"/>
            <param name="annTSSendOffset" value="50"/>
            <param name="annTTSstartOffset" value="-50"/>
            <param name="annTTSendOffset" value="50"/>
            <output name="output" file="annotations_small_TSSTTS.txt" ftype="tabular"/>
            <output name="output_stats" file="annotations_small_TSSTTS_stats.txt" ftype="tabular"/>
        </test>
    </tests>
    <help><![CDATA[
This tool convert a GTF file to a HOMER-style annotation file compatible with annotatePeaks.
It follows the tutorial proposed here: http://homer.ucsd.edu/homer/ngs/advancedAnnotation.html
        ]]></help>
    <expand macro="citation"/>
</tool>