view chira_merge.xml @ 0:5db894671434 draft

"planemo upload for repository commit e4f841daf49048d6c656d50cffb344b53eebeec2"
author iuc
date Sun, 19 Jan 2020 16:31:34 -0500
children ce26b5a859ba
line wrap: on
line source

<tool id="chira_merge" name="ChiRA merge" version="@WRAPPER_VERSION@0">
    <description>merge aligned positions</description>
    <expand macro="requirements" />
        -b '$alignments'
        #if str($annotation.choice) == "yes":
            -g '$annotation.gtf'
        #end if            
        -ao '$alignment_overlap'
        -so '$segment_overlap'
        -o ./

        <param format="bed" name="alignments" type="data" label="Input BED file of alignments"/>
        <conditional name="annotation">
            <param name="choice" type="select" label="Hybridize interacting loci?"
                   help="Hybridization is a time consuming process.">
                <option value="yes">Yes</option>
                <option value="no">No</option>
            <when value="yes">
                <param format="gtf,gff" name="gtf" type="data" label="Annotations in GTF format"/>
            <when value="no">
                <!-- Do nothing -->
        <param name="alignment_overlap" type="float" value="0.7" label="Overlap fraction for merging alignments" min="0" max="1"
            help="Minimum fraction of BED entries that must overlap inorder to merge"/>
        <param name="segment_overlap" type="float" value="0.7" label="Overlap fraction for merging mapped read positions to segments" min="0" max="1"
            help="Matching read positions with greater than this fraction overlap are merged into a segment"/>
        <data format="bed" name="segments_bed" from_work_dir="segments.bed" label="ChiRA aligned read segments on ${on_string}"/>
        <data format="tabular" name="merged_bed" from_work_dir="merged.bed" label="ChiRA merged alignments on ${on_string}"/>

        <!-- Test: Map without annotation -->
        <test expect_num_outputs="2">
            <param name="alignments" value="alignments.bed"/>
            <param name="choice" value="no" />
            <output name="segments_bed" >
                    <has_text_matching expression="ENSMUST00000160533\t69\t82\t6|1|4,ENSMUST00000160533,69,82,+,42S13M\t0\t+" />
            <output name="merged_bed" >
                    <has_text_matching expression="ENSMUST00000182010\t19\t74\t+\t6|1|1,ENSMUST00000182010,19,68,+,5S49M1S;7|9|1,ENSMUST00000182010,24,74,+,5S50M" />
        <!-- Test: Map with annotation -->
        <test expect_num_outputs="2">
            <param name="alignments" value="alignments.bed" />
            <param name="choice" value="yes" />
            <param name="gtf" value="annotation.gtf" />
            <output name="segments_bed" >
                    <has_text_matching expression="5\t137142331\t137142344\t6|1|4,ENSMUST00000160533,69,82,+,42S13M\t0\t-" />
            <output name="merged_bed" >
                    <has_text_matching expression="17\t39846976\t39847031\t+\t6|1|1,ENSMUST00000182010,19,68,+,5S49M1S;7|9|1,ENSMUST00000182010,24,74,+,5S50M" />


.. class:: infomark

**What it does**

This tool merges the overlapping aligned positions to define the read concentrated loci. If an annotation GTF file produced, the transcriptomic alignment positions are first converted to their corresponding genomic positions.


* Alignments in BED format
* An annotation GTF file contaning reference genomic positions.


* BED file containing the alignments with reads categorized into segments depending on which part of the read is aligned.
* Tabular file containing merged alignments. 4th column contains all the alignments merged into that location.

    <expand macro="citations" />