annotate correctGCBias.xml @ 6:1ee0b1ecf500 draft

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