view arriba_draw_fusions.xml @ 9:8c4c97fd0555 draft

"planemo upload for repository https://github.com/jj-umn/tools-iuc/tree/arriba/tools/arriba commit bd2c6bea7cb7dc30ca57f9d69ad49460ddf7f14b"
author jjohnson
date Wed, 13 Oct 2021 18:45:16 +0000
parents 25d207f7ff83
children
line wrap: on
line source

<tool id="arriba_draw_fusions" name="Arriba Draw Fusions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" python_template_version="3.5">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="exit_code"><![CDATA[
    #if $alignments.extension == 'sam'
        ln -sf '$genome.assembly' input.fa &&
        samtools faidx input.fa &&
        samtools view -b -@ \${GALAXY_SLOTS:-1} -t input.fa.fai '$alignments' | 
        samtools sort -O bam -@ \${GALAXY_SLOTS:-1} -T "\${TMPDIR:-.}" -o Aligned.sortedByCoord.out.bam &&
        samtools index Aligned.sortedByCoord.out.bam &&
    #else
        ln -sf '${alignments}' 'Aligned.sortedByCoord.out.bam' &&
        ln -sf '$alignments.metadata.bam_index' 'Aligned.sortedByCoord.out.bam.bai' &&
    #end if
    @DRAW_FUSIONS@
    ]]></command>
    <inputs>
        <param argument="--fusions" type="data" format="tabular" label="Arriba fusions.tsv"/>
        <param argument="--alignments" type="data" format="sam,bam" label="STAR Aligned.out.bam"/>
        <expand macro="genome_source" assembly_optional="true"/>
        <param name="protein_domains" argument="-p" type="data" format="gff3" optional="true" label="File containing protein domains"/>
        <section name="visualization" expanded="true" title="Visualization Options">
             <expand macro="visualization_options" />
        </section>
    </inputs>
    <outputs>
        <data name="fusions_pdf" format="pdf" label="${tool.name} on ${on_string}: fusions.pdf" from_work_dir="fusions.pdf">
            <filter>visualization['do_viz'] == "yes"</filter>
        </data> 
    </outputs>
    <tests>
        <!-- Test 1 - From exisitng BAM -->
        <test> 
            <param name="fusions" ftype="tabular" value="fusions.tsv"/>
            <param name="alignments" ftype="sam" value="Aligned.out.sam"/>
            <conditional name="genome">
                <param name="genome_source" value="history"/>
                <param name="assembly" ftype="fasta" value="genome.fasta"/>
                <param name="annotation" ftype="gtf" value="genome.gtf"/>
            </conditional>
            <param name="protein_domains" ftype="gff3" value="protein_domains.gff3"/>
            <section name="visualization">
                <param name="cytobands" ftype="tabular" value="cytobands.tsv"/>
            </section>
            <output name="fusions_pdf">
                <assert_contents>
                    <has_size value="64000" delta="5000" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**Arriba Draw Fusions**

Arriba_Draw_Fusions_ (draw_fusions.R) renders publication-quality visualizations of the transcripts involved in predicted fusions. It generates a PDF file with one page for each predicted fusion. Each page depicts the fusion partners, their orientation, the retained exons in the fusion transcript, statistics about the number of supporting reads, and - if the column fusion_transcript has a value - an excerpt of the sequence around the breakpoint.


**INPUTS**

See: https://arriba.readthedocs.io/en/latest/command-line-options/#draw_fusionsr

  - Fusions  

    File containing fusion predictions from Arriba_ (fusions.tsv) or STAR-Fusion (star-fusion.fusion_predictions.tsv or star-fusion.fusion_predictions.abridged.coding_effect.tsv).

  - Annotation

    Gene annotation in GTF format that was used by the STAR aligner. 

  - Alignments

    BAM file containing normal alignments from STAR. 

  - Annotation

    The gene annotation (parameter -g) is used for multiple purposes:

  - Assembly (Optional)

    Only required when alignments are not sorted bam format.  The genonme assembly will be used by samtools to produce a sorted bam file.

  - Protein domains (Optional)

    GFF3 file containing the genomic coordinates of protein domains. Distributions of Arriba offer protein domain annotations for all supported assemblies in the database directory. When this file is given, a plot is generated, which shows the protein domains retained in the fusion transcript. 

  - Cytobands (Optional)

    Coordinates of the Giemsa staining bands. This information is used to draw ideograms. If the argument is omitted, then no ideograms are rendered. The file must have the following columns: contig, start, end, name, giemsa. Recognized values for the Giemsa staining intensity are: gneg, gpos followed by a percentage, acen, stalk. Cytobands forahuman and mouse reference can be retrieved from the Arriba distribution with the **Arriba Get Filters** tool. 


**OPTIONS**

  See: https://arriba.readthedocs.io/en/latest/command-line-options/#draw_fusionsr


**OUTPUTS**

See: https://arriba.readthedocs.io/en/latest/visualization/

  - fusions.pdf

    A PDF file with one page for each predicted fusion. Each page depicts the fusion partners, their orientation, the retained exons in the fusion transcript, statistics about the number of supporting reads, and if the column fusion_transcript has a value an excerpt of the sequence around the breakpoint.

.. image:: draw-fusions-example.png
  :width: 800
  :height: 467




.. _Arriba_Draw_Fusions: https://arriba.readthedocs.io/en/latest/visualization/
.. _Arriba: https://arriba.readthedocs.io/en/latest/

    ]]></help>
    <expand macro="citations" />
</tool>