view plot_coverage.xml @ 81:a446ab055307 draft default tip

"planemo upload for repository https://github.com/bardin-lab/readtagger/tree/master/galaxy commit 1abb25638cbf5e86c70b59de6453c7c045c2364f"
author mvdbeek
date Sun, 26 Apr 2020 07:59:19 -0400
parents c9361b7a025d
children
line wrap: on
line source

<tool id="plot_coverage" name="Plot coverage" version="0.5.25">
    <description>as area plot between BAM files</description>
    <requirements>
        <requirement type="package" version="0.5.25">readtagger</requirement>
    </requirements>
    <command detect_errors="aggressive"><![CDATA[
#import re
plot_coverage
#for $r in $input_files
    #set identifier = re.sub('[^\w\-_\.\,]', '_', str( $r.input.element_identifier))
    --file '$r.input' '$identifier' $r.total_reads
#end for
output.pdf --cores \${GALAXY_SLOTS:-4} --regions '$regions' --plot_kind $plot_kind --style $style
    ]]></command>
    <inputs>
        <repeat name="input_files" title="Add input files to coverage plot" min="1">
            <param name="input" type="data" format="bam,cram" label="Select a BAM file to plot"/>
            <param name="total_reads" type="integer" value="0" min="0" label="Total number of (mapped) reads. If given plot scale will be reads per million"/>
        </repeat>
        <param name="regions" type="text" label="Select regions to plot" optional="true" help="e.g X:1200000-1250000,X1250000-1300000. If left blank will plot all contigs/chromosomes.">
            <sanitizer>
                <valid initial="string.letters,string.digits">
                    <add value="-" />
                    <add value="_" />
                    <add value="," />
                    <add value=":" />
                    <add value="." />
                </valid>
            </sanitizer>
        </param>
        <param name="plot_kind" type="select" label="Select the plot type">
            <option value="area">Area plot</option>
            <option value="line">Line plot</option>
        </param>
       <param name="style" type="select" label="Select a plotting style">
           <option value="ggplot">ggplot</option>
           <option value="classic">classic</option>
           <option value="grayscale">greyscale</option>
           <option value="dark_background">dark_background</option>
           <option value="seaborn">seaborn</option>
           <option value="seaborn-bright">seaborn-bright</option>
           <option value="seaborn-colorblind">seaborn-colorblind</option>
           <option value="seaborn-dark">seaborn-dark</option>
           <option value="seaborn-dark-palette">seaborn-dark-palette</option>
           <option value="seaborn-darkgrid">seaborn-darkgrid</option>
           <option value="seaborn-deep">seaborn-deep</option>
           <option value="seaborn-muted">seaborn-muted</option>
           <option value="seaborn-notebook">seaborn-notebook</option>
           <option value="seaborn-paper">seaborn-paper</option>
           <option value="seaborn-pastel">seaborn-pastel</option>
           <option value="seaborn-poster">seaborn-poster</option>
           <option value="seaborn-talk">seaborn-talk</option>
           <option value="seaborn-ticks">seaborn-ticks</option>
           <option value="seaborn-white">seaborn-white</option>
           <option value="seaborn-whitegrid">seaborn-whitegrid</option>
           <option value="tableau-colorblind10">tableau-colorblind10</option>
       </param>
    </inputs>
    <outputs>
        <data name="output" format="pdf" label="Coverage plot on $on_string" from_work_dir="output.pdf"/>
    </outputs>
    <tests>
        <test>
            <param name="input_files_0|input" value="three_cluster_out.bam" ftype="bam"/>
            <param name="input_files_1|input" value="three_cluster_out.bam" ftype="bam"/>
            <param name="input_files_0|total_reads" value="1000000" ftype="bam"/>
            <param name="input_files_1|total_reads" value="1000000" ftype="bam"/>
            <param name="regions" value="3R:13373525-13373615"/>
            <output name="output" file="three_cluster_plot.pdf" ftype="pdf" compare="sim_size"/>
        </test>
        <test>
            <param name="input_files_0|input" value="three_cluster_out.bam" ftype="bam"/>
            <param name="input_files_1|input" value="three_cluster_out.bam" ftype="bam"/>
            <param name="input_files_0|total_reads" value="1000000" ftype="bam"/>
            <param name="input_files_1|total_reads" value="1000000" ftype="bam"/>
            <param name="regions" value="3R:13373525-13373615"/>
            <param name="plot_kind" value="line"/>
            <output name="output" file="three_cluster_plot_line.pdf" ftype="pdf" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[

This tool plots the coverage over a specified region (by default all chromosomes/contigs).

    ]]></help>
</tool>