annotate correctGCBias.xml @ 24:d7c9fd76e41e draft

Uploaded
author bgruening
date Tue, 04 Feb 2014 09:12:07 -0500
parents 8c452f37c896
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
8c452f37c896 Uploaded
bgruening
parents: 22
diff changeset
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.4">
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>
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
6 <token name="@BINARY@">correctGCBias</token>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
7 <import>deepTools_macros.xml</import>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
8 </macros>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
9 <command>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
10 #import tempfile
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
11 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
12
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
13 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
14 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
15 #silent $temp_bam_handle.close()
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
16 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
17 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
18
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
19
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
20 correctGCBias
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
21
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
22 @THREADS@
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
23
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
24 --bamfile '$temp_bam_path'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
25 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
26
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
27 @reference_genome_source@
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
28
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
29
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
30 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
31 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
32 #else:
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
33 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
34 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
35
20
69ff16ba27bd Uploaded
bgruening
parents: 18
diff changeset
36 #if str($region).strip() != '':
22
f85c85597f95 Uploaded
bgruening
parents: 20
diff changeset
37 --region '$region'
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
38 #end if
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
39
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
40 #if $advancedOpt.showAdvancedOpt == "yes":
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
41 --binSize '$advancedOpt.binSize'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
42 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
43
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
44 ###set newoutFileName="corrected."+str($outFileFormat)
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
45 ##--correctedFile $newoutFileName;
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
46 --correctedFile "corrected.bam";
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
47
24
d7c9fd76e41e Uploaded
bgruening
parents: 23
diff changeset
48 mv "corrected.bam" $outFileName
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
49 </command>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
50 <inputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
51 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
52 <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
53 <expand macro="reference_genome_source" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
54 <expand macro="effectiveGenomeSize" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
55
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
56 <!--
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
57 <param name="outFileFormat" type="select" label="File format of the output">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
58 <option value="bam">bam</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
59 <option value="bw">bigwig</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
60 <option value="bg">bedgraph</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
61 </param>
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
62 -->
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
63 <expand macro="region_limit_operation" />
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
64
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
65 <conditional name="advancedOpt">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
66 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
67 <option value="no" selected="true">no</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
68 <option value="yes">yes</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
69 </param>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
70 <when value="no" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
71 <when value="yes">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
72 <param name="binSize" type="integer" value="50" min="1"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
73 label="Bin size in bp"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
74 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
75 </when>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
76 </conditional>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
77 </inputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
78 <outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
79 <data format="bam" name="outFileName">
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
80 <!--<change_format>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
81 <when input="outFileFormat" value="bw" format="bigwig" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
82 <when input="outFileFormat" value="bam" format="bam" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
83 <when input="outFileFormat" value="bg" format="bedgraph" />
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
84 </change_format>-->
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
85 </data>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
86 </outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
87 <help>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
88
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
89 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
90
24
d7c9fd76e41e Uploaded
bgruening
parents: 23
diff changeset
91 This tool requires the output from computeGCBias to correct a given BAM file according to the method proposed by
d7c9fd76e41e Uploaded
bgruening
parents: 23
diff changeset
92 Benjamini and Speed (2012) Nucleic Acids Res.
d7c9fd76e41e Uploaded
bgruening
parents: 23
diff changeset
93 The resulting BAM file can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
94
24
d7c9fd76e41e Uploaded
bgruening
parents: 23
diff changeset
95 You can find more details on the correctGCBias wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-correctGCbias
18
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
96
5ea8782d650c Uploaded
bgruening
parents: 13
diff changeset
97
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
98 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
99
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
100 - GC-normalized BAM file
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
101
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
102 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
103
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
104 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
105
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
106 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
107 </tool>