comparison bamCorrelate.xml @ 39:c6f1a059bc7d

Uploaded
author bgruening
date Fri, 02 Aug 2013 12:18:55 -0400
parents
children 6a2a7374450b
comparison
equal deleted inserted replaced
38:1a78aa9ea234 39:c6f1a059bc7d
1 <tool id="bamCorrelate" name="bamCorrelate" version="1.0">
2 <description>corrlates pairs of bam files</description>
3
4 <command>
5 #set files=[]
6 #set labels=[]
7 #for $i in $inputs
8 #set $files += [str($i.bamfile)]
9 #if str($i.label.value) != "":
10 #set $labels += ["\"%s\"" % ($i.label.value)]
11 #else
12 #set $labels += ["\"%s\"" % ($i.bamfile.name)]
13 #end if
14 #end for
15 bamCorrelate
16 --bamfiles #echo " ".join($files)
17 --labels #echo " ".join($labels)
18
19 --fragmentLength $fragmentLength
20 --corMethod $corMethod
21
22 #set newoutFileName=str($outFileName)+".png"
23 --plotFile $newoutFileName
24
25 #if $outputOpt.showOutputOpt == "yes"
26 #if $outputOpt.outFileRawCounts:
27 --outRawCounts '$outputOpt.outFileRawCounts'
28 #end if
29 #if $outputOpt.outFileCorMatrix:
30 --outFileCorMatrix '$outputOpt.outFileCorMatrix'
31 #end if
32 #end if
33
34 #if $advancedOpt.showAdvancedOpt == "yes":
35 #if $advancedOpt.smoothLength:
36 --smoothLength '$advancedOpt.smoothLength'
37 #end if
38
39 #if str($advancedOpt.region.value) != '':
40 --region '$advancedOpt.region'
41 #end if
42
43 --binSize '$advancedOpt.binSize'
44 --numberOfSamples '$advancedOpt.numberOfSamples'
45
46 $advancedOpt.doNotExtendPairedEnds
47 $advancedOpt.ignoreDuplicates
48 $advancedOpt.includeZeros
49
50 #if $advancedOpt.minMappingQuality:
51 --minMappingQuality '$advancedOpt.minMappingQuality'
52 #end if
53 #end if
54
55 --numberOfProcessors 4; mv $newoutFileName $outFileName
56 </command>
57
58 <inputs>
59
60 <repeat name="inputs" title="Input files" min="2">
61 <param name="bamfile" type="data" format="bam"
62 label="Bam file"
63 help="The BAM file must be sorted and indexed."/>
64 <param name="label" type="text" size="30" optional="true" value=""
65 label="Label"
66 help="Label to use in the output. If not given the dataset name will be used instead."/>
67 </repeat>
68
69 <param name="fragmentLength" type="integer" value="300" min="1"
70 label="Length of the average fragment size"
71 help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see &quot;normalize coverage to 1x&quot;). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/>
72
73 <param name="corMethod" type="select" label="Correlation method">
74 <option value="pearson">Pearson</option>
75 <option value="spearman">Spearman</option>
76 </param>
77
78 <conditional name="advancedOpt">
79 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
80 <option value="no" selected="true">no</option>
81 <option value="yes">yes</option>
82 </param>
83 <when value="no" />
84 <when value="yes">
85 <param name="smoothLength" type="integer" value="1" optional="true" min="1"
86 label="Smooth values using the following length (in bp)"
87 help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/>
88
89 <param name="region" type="text" value=""
90 label="Region of the genome to limit the operation to"
91 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;" />
92
93 <param name="binSize" type="integer" value="10000" min="1"
94 label="Bin size in bp"
95 help="Length in base pairs for a window used to sample the genome."/>
96
97 <param name="numberOfSamples" type="integer" value="100000" min="1"
98 label="Number of samples"
99 help="Number of samples taken from the genome to compute the scaling factors"/>
100
101 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
102 label="Do not extend paired ends"
103 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."/>
104
105 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
106 label="Ignore duplicates"
107 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." />
108
109 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
110 label="Minimum mapping quality"
111 help= "If set, only reads that have a mapping quality score higher than the given value are considered"/>
112
113 <param name="includeZeros" type="boolean" truevalue="--includeZeros" falsevalue=""
114 label ="Include zeros"
115 help ="If set, then zero counts that happen for *all* bam files given are included. The default behavior is to ignore those cases" />
116
117 </when>
118 </conditional>
119
120 <conditional name="outputOpt">
121 <param name="showOutputOpt" type="select" label="Show additional output options" >
122 <option value="no" selected="true">no</option>
123 <option value="yes">yes</option>
124 </param>
125 <when value="no" />
126 <when value="yes">
127 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
128 <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/>
129 </when>
130 </conditional>
131
132 </inputs>
133 <outputs>
134 <data format="png" name="outFileName" />
135 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
136 <filter>(outputOpt['showOutputOpt'] == 'yes' and outputOpt['saveRawCounts'] == True)</filter>
137 </data>
138 <data format="tabular" name="outFileCorMatrix" label="${tool.name} on ${on_string}: correlation matrix">
139 <filter>(outputOpt['showOutputOpt'] == 'yes' and outputOpt['saveCorMatrix'] == True)</filter>
140 </data>
141 </outputs>
142 <help>
143
144 **What it does**
145
146 Genomes are split into bins of given length. For each bin the number of reads
147 found for each of the bam files is counted. A correlation is computed for all
148 pairs of bam files.
149
150 -----
151
152 .. class:: infomark
153
154 Please acknowledge that this tool **is still in development** and we will be very happy to receive feedback from the users. If you run into any trouble please sent an email to `Fidel Ramirez`_.
155
156 This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
157
158
159 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
160 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
161 .. _Fidel Ramirez: ramirez@ie-freiburg.mpg.de
162
163 </help>
164
165 </tool>