annotate correctGCBias.xml @ 3:9441b4e5d2d6 draft

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