view chira_extract.xml @ 11:a618f28e1496 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chira commit 51f68a6d51d9e87f8e54021ce760b1506a3589b8"
author iuc
date Sun, 14 Jun 2020 17:37:05 -0400
parents 7ec1d063fecd
children 97ca48f470ef
line wrap: on
line source

<tool id="chira_extract" name="ChiRA extract" version="@WRAPPER_VERSION@0">
    <description>extrat the chimeras</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="aggressive"><![CDATA[
        #set $genomic_fasta = ''
        #if str($annotation.annot_choice) == "yes":
            #if str($annotation.fasta_source.fasta_source_selector) == 'history':
                #set $genomic_fasta = $annotation.fasta_source.fasta
            #else
                #set $genomic_fasta = $annotation.fasta_source.fasta_id.fields.path
            #end if
        #end if
        chira_extract.py
        -l '$loci'
        #if str($annotation.annot_choice) == "yes":
            -g '$annotation.gtf'
            #if $hybridize:
                -f '$genomic_fasta'
            #end if
        #end if
        -tc '$tpm_cutoff'
        -sc '$score_cutoff'
        -co '$chimeric_overlap'
        #if str($reference.ref_type) == "single":
            -f1 '$reference.ref_fasta'
        #else if str($reference.ref_type) == "split":
            -f1 '$reference.ref_fasta1'
            -f2 '$reference.ref_fasta2'
        #end if
        $hybridize
        $seed_interaction
        -sbp '$seed_bp'
        -smpu '$seed_min_pu'
        -acc '$accessibility'
        -accw '$acc_width'
        -m '$intarna_mode'
        $summarize
        -p "\${GALAXY_SLOTS:-2}"
        -o ./
    ]]></command>

    <inputs>
        <param format="tabular" name="loci" type="data" label="File containing CRLs information"/>
        <conditional name="annotation">
            <param name="annot_choice" type="select" label="Have genomic information?"
                   help="Selecet Yes if you have an annotation file and provide corresponding genomic fasta file">
                <option value="yes">Yes</option>
                <option value="no">No</option>
            </param>
            <when value="yes">
                <param format="gtf,gff" name="gtf" type="data" label="Annotations in GTF format"/>
                <conditional name="fasta_source">
                    <param name="fasta_source_selector" type="select" label="Choose the source for the FASTA file">
                        <option value="history" selected="true">History</option>
                        <option value="preloaded">Server indexed files</option>
                    </param>
                    <when value="history">
                        <param name="fasta" type="data" format="fasta" label="Genomic FASTA file" />
                    </when>
                    <when value="preloaded">
                       <param name="fasta_id" type="select" label="Select FASTA index">
                          <options from_data_table="fasta_indexes" />
                       </param>
                    </when>
                </conditional>
            </when>
            <when value="no">
                <!-- Do nothing -->
            </when>
        </conditional>
        <param name="tpm_cutoff" type="float" value="0" label="TPM cut-off" min="0" max="1"
               help="Transcripts with less than this percentile TPMs will be discarded in the final output. [0-1.0]"/>
        <param name="score_cutoff" type="float" value="0" label="Score cut-off" min="0" max="2"
               help="Hybrids with less than this score will be discarded in the final output. [0-2.0]"/>
        <param name="chimeric_overlap" type="integer" value="2"
               label=" Maximum number of bases allowed between the chimericsegments of a read"/>
        <conditional name="reference">
            <param name="ref_type" type="select" label="Did you use single or split reference for alignment?">
                <option value="split">Split reference</option>
                <option value="single">Single reference</option>
            </param>
            <when value="split">
                <param format="fasta" name="ref_fasta1" type="data" label="Reference FASTA file"
                       help="Reference fasta file"/>
                <param format="fasta" name="ref_fasta2" type="data" label="Second reference FASTA file"
                       help="Second reference fasta file."/>
            </when>
            <when value="single">
                <param format="fasta" name="ref_fasta" type="data" label="Reference FASTA file"
                       help="Reference fasta file"/>
            </when>
        </conditional>
        <param name="hybridize" type="boolean" truevalue="-r" falsevalue="" checked="false"
               label="Hybridize chimeric loci?"
               help="Turning this option on increases the run time of the tool significantly."/>
        <param name="intarna_mode" type="select">
            <option value="H">Heuristic</option>
            <option value="M">Exact</option>
            <option value="S">Seed-only</option>
        </param>
        <param name="seed_interaction" type="boolean" truevalue="" falsevalue="--noSeed" checked="true"
               label="Enforce seed interaction?"/>
        <param name="seed_bp" type="integer" value="5" min="2" max="20"
               label="Number of inter-molecular base pairs within the seed region"
               help="IntaRNA --seedBP parameter"/>
        <param name="seed_min_pu" type="float" value="0" min="0" max="1"
               label="Minimal unpaired probability (per sequence) a seed region may have"
               help="IntaRNA --seedMinPu parameter"/>
        <param name="accessibility" type="boolean" truevalue="C" falsevalue="N" checked="false"
               label="Compute accessibility profiles for interacting sequences?"/>
        <param name="acc_width" type="integer" value="150" min="0" max="99999"
               label="Sliding window size for accessibility computation"
               help="IntaRNA --accW parameter"/>
        <param name="temperature" type="float" value="37" min="0" max="100"
               label="IntaRNA temperature parameter in Celsius to setup the VRNA energy parameters"/>
        <param name="summarize" type="boolean" truevalue="-s" falsevalue="" checked="false"
               label="Summarize interactions at loci level?"/>
    </inputs>

    <outputs>
        <data format="tabular" name="chimeras" from_work_dir="chimeras" label="ChiRA chimeric reads on ${on_string}"/>
        <data format="tabular" name="interactions" from_work_dir="interactions" label="ChiRA interaction summary on ${on_string}">
            <filter>summarize == True</filter>
        </data>
    </outputs>

    <tests>
        <test expect_num_outputs="2">
            <param name="loci" value="loci.counts"/>
            <param name="ref_type" value="split"/>
            <param name="ref_fasta1" value="ref1.fasta"/>
            <param name="ref_fasta2" value="ref2.fasta"/>
            <param name="annot_choice" value="no"/>
            <param name="hybridize" value="true" />
            <param name="summarize" value="true" />
            <output name="chimeras" file="chimeras"/>
            <output name="interactions" file="interactions"/>
        </test>
    </tests>
    <help>

.. class:: infomark

**What it does**

This tool extracts the best chimeric alignments for each read. User can optionally hybridize the loci where the chimeric arms are mapping to.

**Inputs**

  * Tabular file containing CRLs information
  * Annotation GTF file
  * Reference fasta files. Provide both in case of split reference.
  * If your alignments are merged at genomic level in previous step (chira merge), then provide a reference genomic fasta fille.

**Output**

  * Tabular file containing chimeras information
    </help>
    <expand macro="citations" />
</tool>