10
|
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.2">
|
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>
|
|
6 <import>deepTools_macros.xml</import>
|
|
7 </macros>
|
|
8 <command>
|
|
9 #import tempfile
|
|
10 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
|
|
11
|
|
12 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
|
|
13 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
|
|
14 #silent $temp_bam_handle.close()
|
|
15 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
|
|
16 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
|
|
17
|
|
18
|
|
19 correctGCBias
|
5
|
20
|
|
21 @THREADS@
|
|
22
|
0
|
23 --bamfile '$temp_bam_path'
|
|
24 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
|
|
25
|
|
26 @reference_genome_source@
|
|
27
|
|
28
|
|
29 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
|
|
30 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
|
|
31 #else:
|
|
32 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
|
|
33 #end if
|
|
34
|
|
35
|
|
36 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
37 #if str($advancedOpt.region.value) != '':
|
|
38 --region '$advancedOpt.region'
|
|
39 #end if
|
|
40
|
|
41 --binSize '$advancedOpt.binSize'
|
|
42 #end if
|
|
43
|
|
44 #set newoutFileName="corrected."+str($outFileFormat)
|
|
45
|
|
46 --correctedFile $newoutFileName; mv $newoutFileName $outFileName
|
|
47
|
|
48 </command>
|
|
49
|
|
50 <inputs>
|
|
51
|
|
52 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
|
|
53
|
9
|
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
|
55
|
|
56 <expand macro="reference_genome_source" />
|
|
57 <expand macro="effectiveGenomeSize" />
|
|
58
|
|
59 <param name="outFileFormat" type="select" label="File format of the output">
|
|
60 <option value="bam">bam</option>
|
|
61 <option value="bw">bigwig</option>
|
|
62 <option value="bg">bedgraph</option>
|
|
63 </param>
|
|
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="region" type="text" value=""
|
|
73 label="Region of the genome to limit the operation to"
|
|
74 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example "chr10" or "chr10:456700:891000"" />
|
|
75
|
|
76 <param name="binSize" type="integer" value="50" min="1"
|
|
77 label="Bin size in bp"
|
|
78 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
|
|
79 </when>
|
|
80 </conditional>
|
|
81 </inputs>
|
|
82
|
|
83 <outputs>
|
|
84 <data format="bam" name="outFileName">
|
|
85 <change_format>
|
|
86 <when input="outFileFormat" value="bw" format="bigwig" />
|
|
87 <when input="outFileFormat" value="bam" format="bam" />
|
|
88 <when input="outFileFormat" value="bg" format="bedgraph" />
|
|
89 </change_format>
|
|
90 </data>
|
|
91 </outputs>
|
|
92 <help>
|
|
93
|
|
94 **What it does**
|
|
95
|
|
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.
|
|
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.
|
|
98
|
|
99 **Output files**:
|
|
100
|
|
101 - GC-normalized BAM file
|
|
102
|
|
103 -----
|
|
104
|
|
105 .. class:: infomark
|
|
106
|
|
107 @REFERENCES@
|
|
108
|
|
109 </help>
|
|
110 </tool>
|