18
|
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.3">
|
0
|
2 <description>uses the output from computeGCBias to generate corrected BAM files</description>
|
|
3 <expand macro="requirements" />
|
10
|
4 <expand macro="stdio" />
|
0
|
5 <macros>
|
18
|
6 <token name="@BINARY@">correctGCBias</token>
|
0
|
7 <import>deepTools_macros.xml</import>
|
|
8 </macros>
|
13
|
9 <command>
|
|
10 #import tempfile
|
|
11 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
|
0
|
12
|
13
|
13 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
|
|
14 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
|
|
15 #silent $temp_bam_handle.close()
|
|
16 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
|
|
17 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
|
0
|
18
|
|
19
|
13
|
20 correctGCBias
|
5
|
21
|
13
|
22 @THREADS@
|
5
|
23
|
13
|
24 --bamfile '$temp_bam_path'
|
|
25 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
|
0
|
26
|
13
|
27 @reference_genome_source@
|
0
|
28
|
|
29
|
13
|
30 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
|
|
31 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
|
|
32 #else:
|
|
33 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
|
|
34 #end if
|
0
|
35
|
20
|
36 #if str($region).strip() != '':
|
22
|
37 --region '$region'
|
18
|
38 #end if
|
|
39
|
13
|
40 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
41 --binSize '$advancedOpt.binSize'
|
|
42 #end if
|
0
|
43
|
18
|
44 ###set newoutFileName="corrected."+str($outFileFormat)
|
|
45 ##--correctedFile $newoutFileName;
|
|
46 --correctedFile "corrected.bam";
|
0
|
47
|
13
|
48 mv $newoutFileName $outFileName
|
|
49 </command>
|
|
50 <inputs>
|
|
51 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
|
|
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
|
53 <expand macro="reference_genome_source" />
|
|
54 <expand macro="effectiveGenomeSize" />
|
|
55
|
18
|
56 <!--
|
13
|
57 <param name="outFileFormat" type="select" label="File format of the output">
|
|
58 <option value="bam">bam</option>
|
|
59 <option value="bw">bigwig</option>
|
|
60 <option value="bg">bedgraph</option>
|
|
61 </param>
|
18
|
62 -->
|
|
63 <expand macro="region_limit_operation" />
|
13
|
64
|
|
65 <conditional name="advancedOpt">
|
|
66 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
67 <option value="no" selected="true">no</option>
|
|
68 <option value="yes">yes</option>
|
|
69 </param>
|
|
70 <when value="no" />
|
|
71 <when value="yes">
|
|
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 <outputs>
|
|
79 <data format="bam" name="outFileName">
|
18
|
80 <!--<change_format>
|
13
|
81 <when input="outFileFormat" value="bw" format="bigwig" />
|
|
82 <when input="outFileFormat" value="bam" format="bam" />
|
|
83 <when input="outFileFormat" value="bg" format="bedgraph" />
|
18
|
84 </change_format>-->
|
13
|
85 </data>
|
|
86 </outputs>
|
|
87 <help>
|
0
|
88
|
|
89 **What it does**
|
|
90
|
|
91 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.
|
|
92 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
|
|
93
|
18
|
94
|
|
95 You can find more details in the `correctGCBias wiki`_.
|
|
96
|
|
97 .. _correctGCBias wiki: https://github.com/fidelram/deepTools/wiki/QC#wiki-correctGCbias
|
|
98
|
|
99
|
0
|
100 **Output files**:
|
|
101
|
|
102 - GC-normalized BAM file
|
|
103
|
|
104 -----
|
|
105
|
|
106 @REFERENCES@
|
|
107
|
|
108 </help>
|
|
109 </tool>
|