File: plotCoverage.xml

package info (click to toggle)
python-deeptools 3.5.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 34,456 kB
  • sloc: python: 14,503; xml: 4,212; sh: 33; makefile: 5
file content (173 lines) | stat: -rw-r--r-- 7,228 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<tool id="deeptools_plot_coverage" name="plotCoverage" version="@TOOL_VERSION@+galaxy0" profile="@GALAXY_VERSION@">
    <description>assesses the sequencing depth of BAM/CRAM files </description>
    <macros>
        <token name="@BINARY@">plotCoverage</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
<![CDATA[
        #set files=[]
        #set labels=[]

        @multiple_input_bams@

        @BINARY@

            @THREADS@

            --plotFile '$outFileName'
            --bamfiles #echo " ".join($files)#
            --labels #echo " ".join($labels)#
            --plotFileFormat '$outFileFormat'

            #if $outRawCounts:
                --outRawCounts '$outFileRawCounts'
            #end if

            #if ' '.join(map(str, $BED)) != 'None':
                #set bedFileList=[]
                #for $f in $BED:
                    #silent $bedFileList.append("'%s'" % $f)
                #end for
                #if $bedFileList != ["'None'"]:
                    --BED #echo ' '.join($bedFileList)#
                #end if
            #end if

            #if $coverageOpt.showCoverageOpt == "yes":
                --outCoverageMetrics '$outFileCoverageMetrics'
                #for $t in $coverageOpt.thresholds:
                    -ct $t.coverageThreshold
                #end for
            #end if

            #if $advancedOpt.showAdvancedOpt == "yes":
                --numberOfSamples '$advancedOpt.numberOfSamples'
                $advancedOpt.skipZeros

                #if str($advancedOpt.region).strip() != '':
                    --region '$advancedOpt.region'
                #end if
                --numberOfSamples $advancedOpt.numberOfSamples

                #if $advancedOpt.plotTitle and str($advancedOpt.plotTitle.value) != "":
                    --plotTitle '$advancedOpt.plotTitle'
                #end if
                @ADVANCED_OPTS_READ_PROCESSING@
                @PLOTWIDTHHEIGHT@
                @blacklist@
            #end if

]]>
    </command>
    <inputs>

        <expand macro="multiple_input_bams" MIN="1"/>
        <expand macro="custom_sample_labels" />
        <param argument="--BED" type="data" format="bed,gtf" multiple="true" optional="true" min="0"
            label="Regions of interest"
            help="Limits the coverage analysis to the regions specified in these files. This overrides --numberOfSamples. It is inadvisable to combine this with saving the raw counts." />

        <conditional name="coverageOpt">
            <param name="showCoverageOpt" type="select" label="Show coverage metrics options">
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param argument="--outCoverageMetrics" type="boolean" label="Save per-threshold coverage metrics?"/>
                <repeat name="thresholds" title="Coverage Thresholds">
                    <param argument="--coverageThreshold" type="integer" min="0" label="Coverage Threshold" value="0"/>
                </repeat>
            </when>
        </conditional>

        <conditional name="advancedOpt">
            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param argument="--numberOfSamples" type="integer" value="100000" min="1"
                   label="Number of samples"
                   help="Number of samples taken from the genome to compute the scaling factors."/>
                <expand macro="plotWidthHeight" PLOTWIDTH="15.0" PLOTHEIGHT="5.0" />
                <expand macro="region_limit_operation" />
                <expand macro="read_processing_options" />
                <expand macro="skipZeros" />
                <expand macro="plotTitle" />
                <expand macro="blacklist" />
            </when>
        </conditional>
        <expand macro="input_image_file_format" />
        <param argument="--outRawCounts" type="boolean" label="Save raw counts (coverages) to a file" help=""/>
    </inputs>
    <outputs>
        <expand macro="output_image_file_format_not_nested" />
        <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
            <filter>outRawCounts is True</filter>
        </data>
        <data format="tabular" name="outFileCoverageMetrics" label="${tool.name} on ${on_string}: Threshold Metrics">
            <filter>coverageOpt.outCoverageMetrics is True</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="bamfiles" value="bowtie2 test1.bam,bowtie2 test1.bam" ftype="bam" />
            <!--param name="outFileFormat" value="png" /-->
            <param name="showAdvancedOpt" value="yes" />
            <param name="plotTitle" value="Test Title from Galaxy" />
            <param name="outRawCounts" value="True" />
            <output name="outFileRawCounts" file="plotCoverage_result1.tabular" ftype="tabular" />
            <output name="outFileName" file="plotCoverage_result1.png" ftype="png" compare="sim_size" delta="2400" />
        </test>
        <test>
            <param name="bamfiles" value="bowtie2 test1.bam,bowtie2 test1.bam" ftype="bam" />
            <param name="showAdvancedOpt" value="yes" />
            <param name="plotTitle" value="Test Title from Galaxy" />
            <param name="showCoverageOpt" value="yes" />
            <param name="coverageThreshold" value="0" />
            <param name="coverageThreshold" value="5" />
            <param name="coverageThreshold" value="10" />
            <param name="coverageThreshold" value="20" />
            <output name="outFileName" file="plotCoverage_result1.png" ftype="png" compare="sim_size" delta="2400" />
            <output name="outFileCoverageMetrics" file="plotCoverage.metrics" ftype="tabular" />
        </test>
    </tests>
    <help>
<![CDATA[
What it does
-------------

This tool is useful to **assess the sequencing depth** of a given sample.
It samples 1 million bp, counts the number of overlapping reads and reports
a coverage histogram that tells you how many bases are covered how many times.

**Note:** Multiple BAM files are accepted but all should correspond to the same genome assembly.

Output
---------

The default output is a **panel of two plots** (see below for an example): One is a density plot visualizing the frequencies of read coverages, the other one lets you estimate what fraction of the genome has a depth of sequencing of, for example, 2 overlapping reads or more.

The optional output is a table where each row represents the number of reads overlapping with a sampled bp.

.. image:: $PATH_TO_IMAGES/plotCoverage_output.png
   :width: 600
   :height: 345

Example plot
-----------------

.. image:: $PATH_TO_IMAGES/plotCoverage_annotated.png
   :width: 600
   :height: 291


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