<?xml version="1.0" encoding="UTF-8"?>
<tool id="roi_feature_projection" name="RoiFeatureProjection">
    <command>roi_feature_projection
    $roi_feature_projection_quiet
    $roi_feature_projection_verbose
    $roi_feature_projection_very_verbose
    --in-roi "$roi_feature_projection_in_roi"
    --in-features "$roi_feature_projection_in_features"
    --out-roi "$roi_feature_projection_out_roi"
    #if $roi_feature_projection_genome
    --genome "$roi_feature_projection_genome"
    #end if
    --mode "$roi_feature_projection_mode"
    $roi_feature_projection_strand_specific
    --gff-type "$roi_feature_projection_gff_type"
    --gff-group-by "$roi_feature_projection_gff_group_by"
    #if $roi_feature_projection_in_roi
        --in-roi-file-ext ${roi_feature_projection_in_roi.ext}
    #end if
    #if $roi_feature_projection_in_features
        --in-features-file-ext ${roi_feature_projection_in_features.ext}
    #end if
    #if $roi_feature_projection_out_roi
        --out-roi-file-ext ${roi_feature_projection_out_roi.ext}
    #end if
    #if $roi_feature_projection_genome
        --genome-file-ext ${roi_feature_projection_genome.ext}
    #end if</command>
    <description>Region Of Interest Projection.</description>
    <inputs>
        <param label="BED, GFF, or GTF file to read." type="data" name="roi_feature_projection_in_features" format="bed,gff,gtf" />
        <param type="text" name="roi_feature_projection_gff_type" value="" label="The GFF/GTF record type (value of third column) to keep.  Keep all if not set or input file type is not GFF/GTF." optional="true" />
        <param falsevalue="" truevalue="--verbose" type="boolean" name="roi_feature_projection_verbose" label="Enable verbose output." />
        <param label="ROI file to read." type="data" name="roi_feature_projection_in_roi" format="roi" />
        <param falsevalue="" truevalue="--strand-specific" type="boolean" name="roi_feature_projection_strand_specific" label="Enable strand-specific mode if set." />
        <param falsevalue="" truevalue="--very-verbose" type="boolean" name="roi_feature_projection_very_verbose" label="Enable very verbose output." />
        <param falsevalue="" truevalue="--quiet" type="boolean" name="roi_feature_projection_quiet" label="Set verbosity to a minimum." />
        <param label="Path to FASTA file with genome; optional.  When given, this is used for computing the overall region's C+G content." type="data" name="roi_feature_projection_genome" format="fasta,fa" optional="true" />
        <param type="text" name="roi_feature_projection_gff_group_by" value="" label='The GFF/GTF tag to use for grouping, e.g. "Parent", "transcript_id". No grouping if empty.  When using the grouping feature, the --mode is automatically set to projection.' optional="true" />
        <param type="select" name="roi_feature_projection_mode" value="projection" label="The mode in which to combine the ROI and BED/GFF file.  See section Combination Modes below for details.">
            <option value="intersection">intersection</option>
            <option value="projection">projection</option>
            <option value="union">union</option>
            <option value="difference">difference</option>
        </param>
    </inputs>
    <outputs>
        <data label="ROI file to write." name="roi_feature_projection_out_roi" format="roi" />
    </outputs>
    <stdio>
        <exit_code range="1:" level="fatal" />
        <exit_code range=":-1" level="fatal" />
    </stdio>
</tool>
