diff plotFingerprint.xml @ 0:c1b46e0cb7ca draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 0a9265a12a303b54cdaa974e82e87c2ac60962ee-dirty
author bgruening
date Mon, 25 Jan 2016 20:15:58 -0500
parents
children a6d0ddc266bf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plotFingerprint.xml	Mon Jan 25 20:15:58 2016 -0500
@@ -0,0 +1,154 @@
+<tool id="deeptools_plot_fingerprint" name="plotFingerprint" version="@WRAPPER_VERSION@.0">
+    <description>plots profiles of BAM files; useful for assesing ChIP signal strength</description>
+    <macros>
+        <token name="@BINARY@">plotFingerprint</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command>
+<![CDATA[
+        @multiple_input_bams@
+        @BINARY@
+            @THREADS@
+            --bamfiles #echo " ".join($files)
+            --labels #echo " ".join($labels)
+            --plotFile $outFileName
+
+            #if $output.showOutputSettings == "yes"
+                --plotFileFormat $output.outFileFormat
+                #if $output.saveRawCounts:
+                    --outRawCounts '$outFileRawCounts'
+                #end if
+            #else
+                --plotFileFormat 'png'
+            #end if
+
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+
+            #if $advancedOpt.showAdvancedOpt == "yes":
+                --binSize '$advancedOpt.binSize'
+                --numberOfSamples '$advancedOpt.numberOfSamples'
+
+                $advancedOpt.ignoreDuplicates
+                $advancedOpt.skipZeros
+
+                #if $advancedOpt.minMappingQuality:
+                --minMappingQuality '$advancedOpt.minMappingQuality'
+                #end if
+
+                #if $advancedOpt.plotTitle and str($advancedOpt.plotTitle.value) != "":
+                    --plotTitle '$advancedOpt.plotTitle'
+                #end if
+                @ADVANCED_OPTS_READ_PROCESSING@
+            #end if
+]]>
+    </command>
+
+    <inputs>
+        <expand macro="multiple_input_bams" />
+        <expand macro="region_limit_operation" />
+
+        <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="--binSize" type="integer" value="500" min="1"
+                   label="Bin size in bases"
+                   help="Length in bases for a window used to sample the genome."/>
+                <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="read_processing_options" />
+                <expand macro="skipZeros" />
+                <expand macro="plotTitle" />
+            </when>
+        </conditional>
+
+        <conditional name="output">
+            <param name="showOutputSettings" type="select" label="Show advanced output settings">
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <expand macro="input_image_file_format" />
+                <param name="saveRawCounts" type="boolean" label="Save the bin counts" help="(--outRawCounts)"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and
+                output['saveRawCounts'] is True
+            ))
+            </filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bamfiles" value="bowtie2-test1.bam,bowtie2-test1.bam" ftype="bam" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="showOutputSettings" value="no" />
+            <output name="outFileName" file="plotFingerprint_result1.png" ftype="png" compare="sim_size" />
+        </test>
+        <test>
+            <param name="bamfiles" value="bowtie2-test1.bam,bowtie2-test1.bam" ftype="bam" />
+            <param name="showAdvancedOpt" value="yes" />
+            <param name="showOutputSettings" value="yes" />
+            <param name="saveRawCounts" value="True" />
+            <param name="plotTitle" value="Test Fingerprint Plot" />
+            <output name="outFileName" file="plotFingerprint_result2.png" ftype="png" compare="sim_size" />
+            <output name="outFileRawCounts" file="plotFingerprint_result2.tabular" ftype="tabular" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+
+
+**What it does**
+
+This tool is useful for assessing the strength of a ChIP (i.e. how clearly the enrichment signal can be separated from the background)
+and is based on a method described in Diaz et al. (2012) Stat Appl Genet Mol Biol 11(3).
+
+The tool first samples indexed BAM files and counts all reads overlapping a window (bin) of the specified length.
+These counts are then sorted according to their rank (the bin with the highest number of reads has the highest rank)
+and the cumulative sum of read counts are plotted. An ideal input (control) with a uniform distribution of reads alignments
+result in a diagonal line. A very specific and strong ChIP enrichment, on the other hand, would result in a large portion
+of reads accumulating in just a few bins and the resulting plot showing a steep rise toward the right-most edge. Such results are
+most commonly seen with transcription factors.
+
+
+.. image:: $PATH_TO_IMAGES/QC_fingerprint.png
+
+
+You can find more details on the plotFingerprint doc page: https://deeptools.readthedocs.org/en/master/content/tools/plotFingerprint.html
+
+
+**Output files**:
+
+- Diagnostic plot
+- (optional) Data matrix of raw counts
+
+**Output with test dataset**:
+
+What follows is the output of plotFingerprint with our test ChIP-Seq datasets, limiting analysis to chromosome X. Single-end reads were extended to
+200 bp (advanced options).
+
+.. image:: $PATH_TO_IMAGES/bamFP_galaxy_output.png
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>