<tool id="splice_trap" name="SpliceTrap" version="1.0.0">
    <description>A statistic tool for quantifying exon inclusion ratios in paired-end RNA-seq data, with broad applications for the study of alternative splicing.
    </description>
    <requirements>
        <requirement type="package" version="1.2.1.1">bowtie</requirement>
    </requirements>
    <command detect_errors="exit_code" interpreter="perl">
    $__tool_directory__/SpliceTrap.pl -p 8 -l $__tool_directory__ -d hg38v3 -1 
    #if $input_type_conditional.spliceTrap_input_type == "paired"
            $input_type_conditional.input_1 -2 $input_type_conditional.input_2
    #else
            $input_type_conditional.input.forward -2 $input_type_conditional.input.reverse
    #end if 
    -s $read_size $output1 $output2
    </command>
    <inputs>
        <conditional name="input_type_conditional">
                <param name="spliceTrap_input_type" type="select" label="Input Type" help="Select between paired and paired collection">
                        <option value="paired" selected="true">Paired</option>
                        <option value="paired_collection">Paired Collection</option>
                </param>
                <when value="paired">
                        <param format='fastq' name='input_1' type='data' label="FASTQ file, reverse reads" />
                        <param format='fastq' name='input_2' type='data' label="FASTQ file, forward reads" />
                </when>
                <when value="paired_collection">
                        <param format="fastq" name='input' type="data_collection" collection_type="paired" label="Select a paired collection" help="Specify paired dataset collection containing paired reads"/>
                </when>
        </conditional>
        
        <param name='read_size' type='integer' value='50' label="Read size"  />
    </inputs>
    <outputs>
            <data format="txt" name="output1" />
            <data format="txt" name="output2" />
    </outputs>
    <tests>
        <test>
            <param name="input1" value="input1.fastq"/>
            <param name="input2" value="input2.fastq"/>
            <output name="output1" file="output1.txt"/>
            <output name="output2" file="output2.txt"/>
        </test>
        <test>
            <param name="fastq_input">
              <collection type="paired">
                <element name="forward" value="input1.fastq" />
                <element name="reverse" value="input2.fastq" />
              </collection>
            </param>
            <param name="input_type" value="paired_collection" />
            <output name="output1" file="output1.txt"/>
            <output name="output2" file="output2.txt"/>
        </test>
    </tests>
    <help>
        **SpliceTrap**
    </help>
    <citations>
        <citation type="bibtex">
            http://rulai.cshl.edu/splicetrap
        </citation>
    </citations>
</tool>

