comparison bamFingerprint.xml @ 44:894ba1eba734

Uploaded
author bgruening
date Fri, 02 Aug 2013 12:39:14 -0400
parents c6f1a059bc7d
children 6a2a7374450b
comparison
equal deleted inserted replaced
43:975312d6c591 44:894ba1eba734
1 <tool id="bamFingerprint" name="bamFingerprint" version="1.0">
2 <description>plots profiles 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 bamFingerprint
16 --bamfiles #echo " ".join($files)
17 --labels #echo " ".join($labels)
18
19 --fragmentLength $fragmentLength
20
21 #set newoutFileName=str($outFileName)+".png"
22 --plotFile $newoutFileName
23
24 #if $outputOpt.showOutputOpt == "yes"
25 #if $outputOpt.saveRawCounts:
26 --outRawCounts '$outFileRawCounts'
27 #end if
28 #end if
29
30 #if $advancedOpt.showAdvancedOpt == "yes":
31 #if $advancedOpt.smoothLength:
32 --smoothLength '$advancedOpt.smoothLength'
33 #end if
34
35 #if str($advancedOpt.region.value) != '':
36 --region '$advancedOpt.region'
37 #end if
38
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
51 --numberOfProcessors 4; mv $newoutFileName $outFileName
52 </command>
53
54 <inputs>
55
56 <repeat name="inputs" title="Input files" min="2">
57 <param name="bamfile" type="data" format="bam"
58 label="Bam file"
59 help="The BAM file must be sorted and indexed."/>
60 <param name="label" type="text" size="30" optional="true" value=""
61 label="Label"
62 help="Label to use in the output. If not given the dataset name will be used instead."/>
63 </repeat>
64
65 <param name="fragmentLength" type="integer" value="200" min="1"
66 label="Length of the average fragment size"/>
67
68 <conditional name="advancedOpt">
69 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
70 <option value="no" selected="true">no</option>
71 <option value="yes">yes</option>
72 </param>
73 <when value="no" />
74 <when value="yes">
75 <param name="smoothLength" type="integer" value="1" optional="true" min="1"
76 label="Smooth values using the following length (in bp)"
77 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."/>
78
79 <param name="region" type="text" value=""
80 label="Region of the genome to limit the operation to"
81 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;" />
82
83 <param name="binSize" type="integer" value="10000" min="1"
84 label="Bin size in bp"
85 help="Length in base pairs for a window used to sample the genome."/>
86
87 <param name="numberOfSamples" type="integer" value="100000" min="1"
88 label="Number of samples"
89 help="Number of samples taken from the genome to compute the scaling factors"/>
90
91 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
92 label="Do not extend paired ends"
93 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."/>
94
95 <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
96 label="Ignore duplicates"
97 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." />
98
99 <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
100 label="Minimum mapping quality"
101 help= "If set, only reads that have a mapping quality score higher than the given value are considered"/>
102
103 <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue=""
104 label ="Include zeros"
105 help ="If set, then zero counts that happen for *all* bam files given are ignored. This will result in a reduced number of read counts than the specified in number of samples" />
106
107 </when>
108 </conditional>
109
110 <conditional name="outputOpt">
111 <param name="showOutputOpt" type="select" label="Show additional output options" >
112 <option value="no" selected="true">no</option>
113 <option value="yes">yes</option>
114 </param>
115 <when value="no" />
116 <when value="yes">
117 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
118 </when>
119 </conditional>
120
121 </inputs>
122 <outputs>
123 <data format="png" name="outFileName" />
124 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
125 <filter>(outputOpt['showOutputOpt'] == 'yes' and outputOpt['saveRawCounts'] == True)</filter>
126 </data>
127 </outputs>
128 <help>
129
130 **What it does**
131
132 Samples indexed bam files and plots a profile for each bam file. At each
133 sample position all reads overlaping a window (bin) of specified length are
134 counted. This counts are then sorted and the cumulative sum plotted
135
136 -----
137
138 .. class:: infomark
139
140 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`_.
141
142 This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
143
144
145 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
146 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
147 .. _Fidel Ramirez: ramirez@ie-freiburg.mpg.de
148
149 </help>
150
151 </tool>