annotate correctGCBias.xml @ 0:03e5e7b2cedd draft default tip

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