comparison correctGCBias.xml @ 0:d957e25e18a3 draft

Uploaded
author bgruening
date Thu, 14 Nov 2013 16:39:18 -0500
parents
children c54d31467be4
comparison
equal deleted inserted replaced
-1:000000000000 0:d957e25e18a3
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.1">
2 <description>uses the output from computeGCBias to generate corrected BAM files</description>
3 <expand macro="requirements" />
4 <macros>
5 <import>deepTools_macros.xml</import>
6 </macros>
7 <command>
8 #import tempfile
9 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
10
11 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
12 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
13 #silent $temp_bam_handle.close()
14 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
15 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
16
17
18 correctGCBias
19 --bamfile '$temp_bam_path'
20 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
21
22 @reference_genome_source@
23
24
25 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
26 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
27 #else:
28 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
29 #end if
30
31
32 #if $advancedOpt.showAdvancedOpt == "yes":
33 #if str($advancedOpt.region.value) != '':
34 --region '$advancedOpt.region'
35 #end if
36
37 --binSize '$advancedOpt.binSize'
38 #end if
39
40 #set newoutFileName="corrected."+str($outFileFormat)
41
42 --correctedFile $newoutFileName; mv $newoutFileName $outFileName
43
44 </command>
45
46 <inputs>
47
48 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
49
50 <param name="bamInput" format="bam" type="data" label="Input BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/>
51
52 <expand macro="reference_genome_source" />
53 <expand macro="effectiveGenomeSize" />
54
55 <param name="outFileFormat" type="select" label="File format of the output">
56 <option value="bam">bam</option>
57 <option value="bw">bigwig</option>
58 <option value="bg">bedgraph</option>
59 </param>
60
61 <conditional name="advancedOpt">
62 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
63 <option value="no" selected="true">no</option>
64 <option value="yes">yes</option>
65 </param>
66 <when value="no" />
67 <when value="yes">
68 <param name="region" type="text" value=""
69 label="Region of the genome to limit the operation to"
70 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;" />
71
72 <param name="binSize" type="integer" value="50" min="1"
73 label="Bin size in bp"
74 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
75 </when>
76 </conditional>
77 </inputs>
78
79 <outputs>
80 <data format="bam" name="outFileName">
81 <change_format>
82 <when input="outFileFormat" value="bw" format="bigwig" />
83 <when input="outFileFormat" value="bam" format="bam" />
84 <when input="outFileFormat" value="bg" format="bedgraph" />
85 </change_format>
86 </data>
87 </outputs>
88 <help>
89
90 **What it does**
91
92 This tool requires the output from computeGCBias to correct the given BAM files according to the method proposed by Benjamini and Speed (2012). Nucleic Acids Res.
93 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
94
95 **Output files**:
96
97 - GC-normalized BAM file
98
99 -----
100
101 .. class:: infomark
102
103 @REFERENCES@
104
105 </help>
106 </tool>