annotate correctGCBias.xml @ 27:bf1b1dcdd67b draft

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