annotate bamFingerprint.xml @ 0:03e5e7b2cedd draft default tip

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