annotate bamFingerprint.xml @ 13:b4c5dd45778a draft

Uploaded
author bgruening
date Mon, 16 Dec 2013 04:36:19 -0500
parents 135f3bae5c56
children 16310f8b24d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
135f3bae5c56 Uploaded
bgruening
parents: 0
diff changeset
1 <tool id="deeptools_bamFingerprint" name="bamFingerprint" version="1.0.2">
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
2 <description>plots profiles of BAM files; useful for assesing ChIP signal strength</description>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
10
135f3bae5c56 Uploaded
bgruening
parents: 0
diff changeset
4 <expand macro="stdio" />
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
5 <macros>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
6 <import>deepTools_macros.xml</import>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
7 </macros>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
8 <command>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
9 #import tempfile
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
10 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
11
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
12 #set files=[]
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
13 #set labels=[]
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
14
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
15 @multiple_input_bams@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
16
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
17 bamFingerprint
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
18
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
19 @THREADS@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
20
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
21 --bamfiles #echo " ".join($files)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
22 --labels #echo " ".join($labels)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
23
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
24 --fragmentLength $fragmentLength
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
25
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
26 #set newoutFileName=str($outFileName)+".png"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
27 --plotFile $newoutFileName
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
28
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
29 #if $output.showOutputSettings == "yes"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
30 --plotFileFormat $output.outFileFormat
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
31 #if $output.saveRawCounts:
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
32 --outRawCounts '$outFileRawCounts'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
33 #end if
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
34 #else
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
35 --plotFileFormat 'png'
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
36 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
37
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
38
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
39 #if $advancedOpt.showAdvancedOpt == "yes":
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
40
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
41 #if str($advancedOpt.region.value) != '':
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
42 --region '$advancedOpt.region'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
43 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
44
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
45 --binSize '$advancedOpt.binSize'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
46 --numberOfSamples '$advancedOpt.numberOfSamples'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
47
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
48 $advancedOpt.doNotExtendPairedEnds
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
49 $advancedOpt.ignoreDuplicates
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
50 $advancedOpt.skipZeros
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
51
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
52 #if $advancedOpt.minMappingQuality:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
53 --minMappingQuality '$advancedOpt.minMappingQuality'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
54 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
55 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
56 ; mv $newoutFileName $outFileName
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
57 ; rm $temp_dir -rf
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
58 </command>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
59
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
60 <inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
61 <expand macro="multiple_input_bams" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
62
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
63 <param name="fragmentLength" type="integer" value="200" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
64 label="Length of the average fragment size"/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
65 <conditional name="advancedOpt">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
66 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
67 <option value="no" selected="true">no</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
68 <option value="yes">yes</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
69 </param>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
70 <when value="no" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
71 <when value="yes">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
72 <param name="region" type="text" value=""
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
73 label="Region of the genome to limit the operation to"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
74 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
75
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
76 <param name="binSize" type="integer" value="10000" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
77 label="Bin size in bp"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
78 help="Length in base pairs for a window used to sample the genome."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
79
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
80 <param name="numberOfSamples" type="integer" value="100000" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
81 label="Number of samples"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
82 help="Number of samples taken from the genome to compute the scaling factors"/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
83
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
84 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
85 label="Do not extend paired ends"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
86 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."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
87
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
88 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
89 label="Ignore duplicates"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
90 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." />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
91
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
92 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
93 label="Minimum mapping quality"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
94 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."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
95
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
96 <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue=""
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
97 label ="Include zeros"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
98 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." />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
99 </when>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
100 </conditional>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
101
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
102 <conditional name="output">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
103 <param name="showOutputSettings" type="select" label="Show advanced output settings">
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
104 <option value="no" selected="true">no</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
105 <option value="yes">yes</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
106 </param>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
107 <when value="no" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
108 <when value="yes">
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
109 <expand macro="input_image_file_format" />
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
110 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
111 </when>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
112 </conditional>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
113
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
114 </inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
115 <outputs>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
116 <expand macro="output_image_file_format" />
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
117 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
118 <filter>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
119 ((
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
120 outputOpt['showOutputOpt'] == 'yes' and
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
121 outputOpt['saveRawCounts'] is True
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
122 ))
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
123 </filter>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
124 </data>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
125 </outputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
126 <help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
127
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
128 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
129
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
130 This tool is based on a method developed by Diaz et al. (2012). Stat Appl Genet Mol Biol 11(3).
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
131 The resulting plot can be used to assess the strength of a ChIP (for factors that bind to narrow regions).
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
132 The tool first samples indexed BAM files and counts all reads overlapping a window (bin) of specified length.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
133 These counts are then sorted according to their rank and the cumulative sum of read counts are plotted. An ideal input
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
134 with perfect uniform distribution of reads along the genome (i.e. without enrichments in open chromatin etc.) should
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
135 generate a straight diagonal line. A very specific and strong ChIP enrichment will be indicated by a prominent and steep
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
136 rise of the cumulative sum towards the highest rank. This means that a big chunk of reads from the ChIP sample is located in
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
137 few bins which corresponds to high, narrow enrichments seen for transcription factors.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
138
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
139
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
140 .. image:: $PATH_TO_IMAGES/QC_fingerprint.png
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
141
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
142
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
143 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
144
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
145 - Diagnostic plot
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
146 - Data matrix of raw counts
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
147
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
148 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
149
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
150 .. class:: infomark
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
151
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
152 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
153
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
154 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
155 </tool>