view bam_to_scidx.xml @ 4:b737f6d83f48 draft

Uploaded
author iuc
date Fri, 13 Jan 2017 10:25:43 -0500
parents 11fc60f0e942
children 408520e1ae1a
line wrap: on
line source

<tool id="bam_to_scidx" name="Convert BAM to ScIdx" version="1.0.1">
    <description></description>
    <requirements>
        <requirement type="package" version="8.0.112">openjdk</requirement>
    </requirements>
    <stdio>
        <!-- Anything other than zero is an error -->
        <exit_code range=":-1" />
        <exit_code range="1:" />
        <!-- Check stderr in case the return code has not been set -->
        <regex match="Error:" />
        <regex match="Exception:" />
    </stdio>
    <command>
        <![CDATA[
            ln -s "${input_bam}" "localbam.bam" &&
            ln -f -s "${input_bam.metadata.bam_index}" "localbam.bam.bai" &&
            java -jar $__tool_directory__/BAMtoscIDX.jar -b localbam.bam -i localbam.bam.bai -p $require_proper_mate_pairing -r $read -m $min_insert_size -M $max_insert_size -o "$output" 1>/dev/null
        ]]>
    </command>
    <inputs>
        <param name="input_bam" type="data" format="bam" label="BAM file" />
        <param name="require_proper_mate_pairing" type="select" label="Require proper mate-pairing?" help="Required if filtering by insert size for single-end Reqd 1 (below)." >
            <option value="1" selected="True">Yes</option>
            <option value="0">No</option>
        </param>
        <param name="read" type="select" label="Read to output">
            <option value="0" selected="True">Read1</option>
            <option value="1">Read2</option>
            <option value="2">Combined</option>
        </param>
        <param name="min_insert_size" type="integer" value="" optional="True" min="0" label="Minimum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)."/>
        <param name="max_insert_size" type="integer" value="" optional="True" min="0" label="Maximum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)." />
    </inputs>
    <outputs>
        <data name="output" format="scidx" />
    </outputs>
    <tests>
        <test>
            <param name="input_bam" value="input.bam" ftype="bam" />
            <param name="require_proper_mate_pairing" value="1" />
            <param name="read" value="0" />
            <output name="output" file="output.scidx" lines_diff="1" ftype="scidx" compare="contains" />
        </test>
    </tests>
    <help>

**What it does**

Converts BAM data to ScIdx, the Strand-specific coordinate count format, which is used by tools within
the Chip-exo Galaxy flavor.  ScIdx files are 1-based.  The format consists of 5 columns: the chromosome,
the position of the genomic coordinate, the number of tags on the forward strand, the number of tags on
the reverse strand and the number of total tags on the position.  With pair-end reads, only the 5’ end of
READ1 will be used to create the ScIdx data file.  Tools that use this format include GeneTrack and MultiGPS.

-----

**Options**

* **Require proper mate-pairing?** - Select **Yes** to require proper mate paring.  Filtering by insert size parameters will not filter out single-end Read 1 unless proper mate-pairing is required.
* **Minimum insert size to output** - Insert size below the minimum will be filtered from the results, but single-end Read 1 will not be filtered unless proper mate-pairing is required.
* **Maximum insert size to output** - Insert size above the maximum will be filtered from the results, but single-end Read 1 will not be filtered unless proper mate-pairing is required.

    </help>
    <citations>
        <citation type="bibtex">
            @unpublished{None,
            author = {Lai, William},
            title = {None},
            year = {None},
            eprint = {None},
            url = {http://www.huck.psu.edu/content/research/independent-centers-excellence/center-for-eukaryotic-gene-regulation}
        }</citation>
    </citations>
</tool>