annotate correctGCBias.xml @ 10:135f3bae5c56 draft

Uploaded
author bgruening
date Sat, 14 Dec 2013 03:29:29 -0500
parents c53a73b8eef9
children b4c5dd45778a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
135f3bae5c56 Uploaded
bgruening
parents: 9
diff changeset
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.2">
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
2 <description>uses the output from computeGCBias to generate corrected BAM files</description>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
10
135f3bae5c56 Uploaded
bgruening
parents: 9
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 $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
13 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
14 #silent $temp_bam_handle.close()
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
15 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
16 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
17
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
18
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
19 correctGCBias
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
20
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
21 @THREADS@
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
22
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
23 --bamfile '$temp_bam_path'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
24 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
25
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
26 @reference_genome_source@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
27
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
28
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
29 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
30 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
31 #else:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
32 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
33 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
34
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
35
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
36 #if $advancedOpt.showAdvancedOpt == "yes":
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
37 #if str($advancedOpt.region.value) != '':
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
38 --region '$advancedOpt.region'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
39 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
40
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
41 --binSize '$advancedOpt.binSize'
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
42 #end if
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
43
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
44 #set newoutFileName="corrected."+str($outFileFormat)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
45
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
46 --correctedFile $newoutFileName; mv $newoutFileName $outFileName
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
47
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
48 </command>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
49
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
50 <inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
51
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
52 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
53
9
c53a73b8eef9 Uploaded
bgruening
parents: 5
diff changeset
54 <param name="bamInput" format="bam" type="data" label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
55
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
56 <expand macro="reference_genome_source" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
57 <expand macro="effectiveGenomeSize" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
58
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
59 <param name="outFileFormat" type="select" label="File format of the output">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
60 <option value="bam">bam</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
61 <option value="bw">bigwig</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
62 <option value="bg">bedgraph</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
63 </param>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
64
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="50" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
77 label="Bin size in bp"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
78 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
79 </when>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
80 </conditional>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
81 </inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
82
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
83 <outputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
84 <data format="bam" name="outFileName">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
85 <change_format>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
86 <when input="outFileFormat" value="bw" format="bigwig" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
87 <when input="outFileFormat" value="bam" format="bam" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
88 <when input="outFileFormat" value="bg" format="bedgraph" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
89 </change_format>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
90 </data>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
91 </outputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
92 <help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
93
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
94 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
95
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
96 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.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
97 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
98
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
99 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
100
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
101 - GC-normalized BAM file
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
102
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
103 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
104
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
105 .. class:: infomark
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
106
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
107 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
108
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
109 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
110 </tool>