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