annotate bamFingerprint.xml @ 29:3a2aab18a217 draft

Uploaded
author bgruening
date Tue, 16 Sep 2014 13:46:05 -0400
parents f7712a057440
children 5231f398d784
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
1 <tool id="deeptools_bamFingerprint" name="bamFingerprint" version="@WRAPPER_VERSION@.0">
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
2 <description>plots profiles of BAM files; useful for assesing ChIP signal strength</description>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
4 <expand macro="stdio" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
5 <macros>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
6 <token name="@BINARY@">bamFingerprint</token>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
7 <import>deepTools_macros.xml</import>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
8 </macros>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
9 <command>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
10 @multiple_input_bams@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
11
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
12 bamFingerprint
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
13
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
14 @THREADS@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
15
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
16 --bamfiles #echo " ".join($files)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
17 --labels #echo " ".join($labels)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
18
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
19 --fragmentLength $fragmentLength
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
20
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
21 #set newoutFileName=str($outFileName)+".png"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
22 --plotFile $newoutFileName
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
23
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
24 #if $output.showOutputSettings == "yes"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
25 --plotFileFormat $output.outFileFormat
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
26 #if $output.saveRawCounts:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
27 --outRawCounts '$outFileRawCounts'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
28 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
29 #else
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
30 --plotFileFormat 'png'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
31 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
32
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
33 #if str($region).strip() != '':
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
34 --region '$region'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
35 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
36
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
37 #if $advancedOpt.showAdvancedOpt == "yes":
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
38 --binSize '$advancedOpt.binSize'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
39 --numberOfSamples '$advancedOpt.numberOfSamples'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
40
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
41 $advancedOpt.doNotExtendPairedEnds
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
42 $advancedOpt.ignoreDuplicates
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
43 $advancedOpt.skipZeros
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
44
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
45 #if $advancedOpt.minMappingQuality:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
46 --minMappingQuality '$advancedOpt.minMappingQuality'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
47 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
48 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
49 ; mv $newoutFileName $outFileName
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
50 ; rm $temp_dir -rf
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
51 </command>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
52
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
53 <inputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
54 <expand macro="multiple_input_bams" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
55
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
56
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
57 <param name="fragmentLength" type="integer" value="200" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
58 label="Length of the average fragment size"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
59
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
60 <expand macro="region_limit_operation" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
61
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
62 <conditional name="advancedOpt">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
63 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
64 <option value="no" selected="true">no</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
65 <option value="yes">yes</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
66 </param>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
67 <when value="no" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
68 <when value="yes">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
69 <param name="binSize" type="integer" value="10000" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
70 label="Bin size in bp"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
71 help="Length in base pairs for a window used to sample the genome."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
72
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
73 <param name="numberOfSamples" type="integer" value="100000" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
74 label="Number of samples"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
75 help="Number of samples taken from the genome to compute the scaling factors"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
76
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
77 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
78 label="Do not extend paired ends"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
79 help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
80
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
81 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
82 label="Ignore duplicates"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
83 help="If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate position also has to coincide to ignore a read." />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
84
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
85 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
86 label="Minimum mapping quality"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
87 help= "If set, only reads that have a mapping quality score higher than the given value are considered. *Note* Bowtie's Mapping quality is related to uniqueness: the higher the score, the more unique is a read. A mapping quality defined by Bowtie of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
88
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
89 <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue=""
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
90 label ="Include zeros"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
91 help ="If set, then zero counts that happen for *all* BAM files given are ignored. This might have the effect that fewer regions are considered than indicated in the option where the number of samples is defined." />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
92 </when>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
93 </conditional>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
94
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
95 <conditional name="output">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
96 <param name="showOutputSettings" type="select" label="Show advanced output settings">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
97 <option value="no" selected="true">no</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
98 <option value="yes">yes</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
99 </param>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
100 <when value="no" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
101 <when value="yes">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
102 <expand macro="input_image_file_format" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
103 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
104 </when>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
105 </conditional>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
106
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
107 </inputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
108 <outputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
109 <expand macro="output_image_file_format" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
110 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
111 <filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
112 ((
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
113 output['showOutputSettings'] == 'yes' and
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
114 output['saveRawCounts'] is True
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
115 ))
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
116 </filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
117 </data>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
118 </outputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
119 <help>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
120
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
121 **What it does**
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
122
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
123 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)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
124 and it is based on a method developed by Diaz et al. (2012) Stat Appl Genet Mol Biol 11(3).
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
125
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
126 The tool first samples indexed BAM files and counts all reads overlapping a window (bin) of specified length.
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
127 These counts are then sorted according to their rank (the bin with the highest number of reads has the highest rank)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
128 and the cumulative sum of read counts are plotted. An ideal input (control sample) with perfect uniform distribution of reads
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
129 along the genome (i.e. without enrichments in open chromatin etc.) should
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
130 generate a straight diagonal line. A very specific and strong ChIP enrichment will be indicated by a prominent and steep
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
131 rise of the cumulative sum towards the highest rank. This means that a big chunk of reads from the ChIP sample is located in
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
132 few bins which corresponds to high, narrow enrichments seen for transcription factors.
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
133
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
134
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
135 .. image:: $PATH_TO_IMAGES/QC_fingerprint.png
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
136
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
137
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
138 You can find more details on the bamFingerprint wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamFingerprint
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
139
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
140
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
141 **Output files**:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
142
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
143 - Diagnostic plot
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
144 - Data matrix of raw counts
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
145
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
146 -----
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
147
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
148 @REFERENCES@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
149
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
150 </help>
29
3a2aab18a217 Uploaded
bgruening
parents: 28
diff changeset
151 <expand macro="citations" />
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
152 </tool>