view chira_extract.xml @ 19:73d2b7a8d94b draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chira commit 8064fa653fe73c9432c76783d6c635d86548d538"
author iuc
date Sun, 19 Dec 2021 15:47:37 +0000
parents e7ee3aadf1a5
children
line wrap: on
line source

<tool id="chira_extract" name="ChiRA extract" version="@TOOL_VERSION@1">
    <description>extrat the chimeras</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <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':
                ## Avoid writing FASTA index to inputdir by symlinking 
                ln -s '${$annotation.fasta_source.fasta}' genome.fa &&
                #set $genomic_fasta = 'genome.fa'
            #else
                #set $genomic_fasta = $annotation.fasta_source.fasta_id.fields.path
            #end if
        #end if
        chira_extract.py
        --loci '$loci'
        #if str($annotation.annot_choice) == "yes":
            --gtf '$annotation.gtf'
            #if $hybridize:
                --ref '$genomic_fasta'
            #end if
        #end if
        --tpm_cutoff '$tpm_cutoff'
        --score_cutoff '$score_cutoff'
        --chimeric_overlap '$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
        --seed_bp '$seed_bp'
        --seed_min_pu '$seed_min_pu'
        --accessibility '$accessibility'
        --acc_width '$acc_width'
        --intarna_mode '$intarna_mode'
        --temperature $temperature
        $summarize
        --processes "\${GALAXY_SLOTS:-2}"
        --out ./
    ]]></command>

    <inputs>
        <param format="tabular" argument="--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" argument="--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 argument="--ref" name="fasta" type="data" format="fasta" label="Genomic FASTA file" />
                    </when>
                    <when value="preloaded">
                        <param argument="--ref" 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 argument="--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 argument="--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 argument="--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" argument="--ref_fasta1" type="data" label="Reference FASTA file"
                       help="Reference fasta file"/>
                <param format="fasta" argument="--ref_fasta2" type="data" label="Second reference FASTA file"
                       help="Second reference fasta file."/>
            </when>
            <when value="single">
                <param format="fasta" argument="--ref_fasta1" name="ref_fasta" type="data" label="Reference FASTA file"
                       help="Reference fasta file"/>
            </when>
        </conditional>
        <param argument="--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 argument="--intarna_mode" type="select">
            <option value="H">Heuristic</option>
            <option value="M">Exact</option>
            <option value="S">Seed-only</option>
        </param>
        <param argument="--no_seed" name="seed_interaction" type="boolean" truevalue="" falsevalue="--no_seed" checked="true"
               label="Enforce seed interaction?"/>
        <param argument="--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 argument="--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 argument="--accessibility" type="boolean" truevalue="C" falsevalue="N" checked="false"
               label="Compute accessibility profiles for interacting sequences?"/>
        <param argument="--acc_width" type="integer" value="150" min="0" max="99999"
               label="Sliding window size for accessibility computation"
               help="IntaRNA --accW parameter"/>
        <param argument="--temperature" type="float" value="37" min="0" max="100"
               label="IntaRNA temperature parameter in Celsius to setup the VRNA energy parameters"/>
        <param argument="--summerize" 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>