61
|
1 <tool id="deeptools_bamFingerprint" name="bamFingerprint" version="@WRAPPER_VERSION@.0">
|
|
2 <description>plots profiles of BAM files; useful for assesing ChIP signal strength</description>
|
|
3 <expand macro="requirements" />
|
|
4 <expand macro="stdio" />
|
|
5 <macros>
|
|
6 <token name="@BINARY@">bamFingerprint</token>
|
|
7 <import>deepTools_macros.xml</import>
|
|
8 </macros>
|
|
9 <command>
|
|
10 <![CDATA[
|
|
11 @multiple_input_bams@
|
|
12
|
|
13 bamFingerprint
|
|
14
|
|
15 @THREADS@
|
|
16
|
|
17 --bamfiles #echo " ".join($files)
|
|
18 --labels #echo " ".join($labels)
|
|
19
|
|
20 --fragmentLength $fragmentLength
|
|
21
|
|
22 #set newoutFileName=str($outFileName)+".png"
|
|
23 --plotFile $newoutFileName
|
|
24
|
|
25 #if $output.showOutputSettings == "yes"
|
|
26 --plotFileFormat $output.outFileFormat
|
|
27 #if $output.saveRawCounts:
|
|
28 --outRawCounts '$outFileRawCounts'
|
|
29 #end if
|
|
30 #else
|
|
31 --plotFileFormat 'png'
|
|
32 #end if
|
|
33
|
|
34 #if str($region).strip() != '':
|
|
35 --region '$region'
|
|
36 #end if
|
|
37
|
|
38 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
39 --binSize '$advancedOpt.binSize'
|
|
40 --numberOfSamples '$advancedOpt.numberOfSamples'
|
|
41
|
|
42 $advancedOpt.doNotExtendPairedEnds
|
|
43 $advancedOpt.ignoreDuplicates
|
|
44 $advancedOpt.skipZeros
|
|
45
|
|
46 #if $advancedOpt.minMappingQuality:
|
|
47 --minMappingQuality '$advancedOpt.minMappingQuality'
|
|
48 #end if
|
|
49 #end if
|
|
50 ; mv $newoutFileName $outFileName
|
|
51 ; rm $temp_dir -rf
|
|
52 ]]>
|
|
53 </command>
|
|
54
|
|
55 <inputs>
|
|
56 <expand macro="multiple_input_bams" />
|
|
57 <expand macro="fragmentLength" />
|
|
58 <expand macro="region_limit_operation" />
|
|
59
|
|
60 <conditional name="advancedOpt">
|
|
61 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
62 <option value="no" selected="true">no</option>
|
|
63 <option value="yes">yes</option>
|
|
64 </param>
|
|
65 <when value="no" />
|
|
66 <when value="yes">
|
|
67 <param name="binSize" type="integer" value="500" min="1"
|
|
68 label="Bin size in bp"
|
|
69 help="Length in base pairs for a window used to sample the genome."/>
|
|
70 <param name="numberOfSamples" type="integer" value="100000" min="1"
|
|
71 label="Number of samples"
|
|
72 help="Number of samples taken from the genome to compute the scaling factors. (--numberOfSamples)"/>
|
|
73 <expand macro="doNotExtendPairedEnds" />
|
|
74 <expand macro="ignoreDuplicates" />
|
|
75 <expand macro="minMappingQuality" />
|
|
76 <expand macro="skipZeros" />
|
|
77
|
|
78 </when>
|
|
79 </conditional>
|
|
80 <conditional name="output">
|
|
81 <param name="showOutputSettings" type="select" label="Show advanced output settings">
|
|
82 <option value="no" selected="true">no</option>
|
|
83 <option value="yes">yes</option>
|
|
84 </param>
|
|
85 <when value="no" />
|
|
86 <when value="yes">
|
|
87 <expand macro="input_image_file_format" />
|
|
88 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
|
|
89 </when>
|
|
90 </conditional>
|
|
91 </inputs>
|
|
92 <outputs>
|
|
93 <expand macro="output_image_file_format" />
|
|
94 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
|
|
95 <filter>
|
|
96 ((
|
|
97 output['showOutputSettings'] == 'yes' and
|
|
98 output['saveRawCounts'] is True
|
|
99 ))
|
|
100 </filter>
|
|
101 </data>
|
|
102 </outputs>
|
|
103 <tests>
|
|
104 <test>
|
|
105 <repeat name="input_files">
|
|
106 <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
|
|
107 </repeat>
|
|
108 <repeat name="input_files">
|
|
109 <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
|
|
110 </repeat>
|
|
111 <param name="fragmentLength" value="200" />
|
|
112 <param name="showAdvancedOpt" value="no" />
|
|
113 <param name="showOutputSettings" value="no" />
|
|
114 <output name="outFileName" file="bamFingerprint_result1.png" ftype="png" />
|
|
115 </test>
|
|
116 </tests>
|
|
117 <help>
|
|
118 <![CDATA[
|
|
119 **What it does**
|
|
120
|
|
121 This tool is useful to assess the strength of a ChIP (i.e. how clearly the enrichment signal can be separated from the background signal)
|
|
122 and it is based on a method developed by Diaz et al. (2012) Stat Appl Genet Mol Biol 11(3).
|
|
123
|
|
124 The tool first samples indexed BAM files and counts all reads overlapping a window (bin) of specified length.
|
|
125 These counts are then sorted according to their rank (the bin with the highest number of reads has the highest rank)
|
|
126 and the cumulative sum of read counts are plotted. An ideal input (control sample) with perfect uniform distribution of reads
|
|
127 along the genome (i.e. without enrichments in open chromatin etc.) should
|
|
128 generate a straight diagonal line. A very specific and strong ChIP enrichment will be indicated by a prominent and steep
|
|
129 rise of the cumulative sum towards the highest rank. This means that a big chunk of reads from the ChIP sample is located in
|
|
130 few bins which corresponds to high, narrow enrichments seen for transcription factors.
|
|
131
|
|
132
|
|
133 .. image:: $PATH_TO_IMAGES/QC_fingerprint.png
|
|
134
|
|
135
|
|
136 You can find more details on the bamFingerprint wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamFingerprint
|
|
137
|
|
138
|
|
139 **Output files**:
|
|
140
|
|
141 - Diagnostic plot
|
|
142 - Data matrix of raw counts
|
|
143
|
|
144 -----
|
|
145
|
|
146 @REFERENCES@
|
|
147 ]]>
|
|
148 </help>
|
|
149 <expand macro="citations" />
|
|
150 </tool>
|