annotate correctGCBias.xml @ 16:16310f8b24d5 draft

Uploaded
author bgruening
date Mon, 16 Dec 2013 15:13:08 -0500
parents b4c5dd45778a
children 5ea8782d650c
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>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
8 <command>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
9 #import tempfile
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
10 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
11
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
12 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
13 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
14 #silent $temp_bam_handle.close()
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
15 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
16 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
17
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
18
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
19 correctGCBias
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
20
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
21 @THREADS@
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
22
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
23 --bamfile '$temp_bam_path'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
24 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
25
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
26 @reference_genome_source@
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
27
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
28
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
29 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
30 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
31 #else:
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
32 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
33 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
34
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
35 #if $advancedOpt.showAdvancedOpt == "yes":
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
36 #if str($advancedOpt.region.value) != '':
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
37 --region '$advancedOpt.region'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
38 #end if
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
39 --binSize '$advancedOpt.binSize'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
40 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
41
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
42 #set newoutFileName="corrected."+str($outFileFormat)
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
43 --correctedFile $newoutFileName;
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
44
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
45 mv $newoutFileName $outFileName
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
46 </command>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
47 <inputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
48 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
49 <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
50 <expand macro="reference_genome_source" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
51 <expand macro="effectiveGenomeSize" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
52
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
53 <param name="outFileFormat" type="select" label="File format of the output">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
54 <option value="bam">bam</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
55 <option value="bw">bigwig</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
56 <option value="bg">bedgraph</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
57 </param>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
58
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
59 <conditional name="advancedOpt">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
60 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
61 <option value="no" selected="true">no</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
62 <option value="yes">yes</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
63 </param>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
64 <when value="no" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
65 <when value="yes">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
66 <param name="region" type="text" value=""
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
67 label="Region of the genome to limit the operation to"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
68 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;" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
69
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
70 <param name="binSize" type="integer" value="50" min="1"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
71 label="Bin size in bp"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
72 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
73 </when>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
74 </conditional>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
75 </inputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
76 <outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
77 <data format="bam" name="outFileName">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
78 <change_format>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
79 <when input="outFileFormat" value="bw" format="bigwig" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
80 <when input="outFileFormat" value="bam" format="bam" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
81 <when input="outFileFormat" value="bg" format="bedgraph" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
82 </change_format>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
83 </data>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
84 </outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
85 <help>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
86
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
87 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
88
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
89 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
90 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
91
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
92 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
93
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
94 - GC-normalized BAM file
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
95
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
96 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
97
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
98 .. class:: infomark
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
99
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
100 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
101
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
102 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
103 </tool>