1
|
1 <tool id="correctGCBias" name="correctGCBias" version="1.0.1">
|
5
|
2 <description>use the output from computeGCBias to obtain corrected sample files</description>
|
0
|
3 <requirements>
|
1
|
4 <requirement type="package" version="1.5.1_59e067cce039cb93add04823c9f51cab202f8c2b">deepTools</requirement>
|
0
|
5 <requirement type="package" version="0.1">ucsc_tools</requirement>
|
|
6 </requirements>
|
|
7 <command>
|
1
|
8 #import tempfile
|
|
9 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
|
|
10
|
|
11 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
|
|
12 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
|
|
13 #silent $temp_bam_handle.close()
|
|
14 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
|
|
15 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
|
|
16
|
|
17
|
0
|
18 correctGCBias
|
1
|
19 --bamfile '$temp_bam_path'
|
0
|
20 --species '$species'
|
|
21 --GCbiasFrequenciesFile $GCbiasFrequenciesFile
|
|
22
|
|
23 #if $source.ref_source=="history":
|
|
24 --genome $source.input1
|
|
25 #else:
|
|
26 --genome "${source.input1_2bit.fields.path}"
|
|
27 #end if
|
|
28
|
|
29 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
30 #if str($advancedOpt.region.value) != '':
|
|
31 --region '$advancedOpt.region'
|
|
32 #end if
|
|
33
|
|
34 --binSize '$advancedOpt.binSize'
|
|
35 #end if
|
|
36
|
|
37 #set newoutFileName="corrected."+str($outFileFormat)
|
|
38
|
|
39 --correctedFile $newoutFileName; mv $newoutFileName $outFileName
|
|
40
|
|
41 </command>
|
|
42
|
|
43 <inputs>
|
1
|
44
|
0
|
45 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
|
1
|
46
|
0
|
47 <param name="bamInput" format="bam" type="data" label="Input BAM file" help="The BAM file must be sorted and indexed."/>
|
1
|
48
|
|
49 <param name="species" type="select" label="Species name abbreviation">
|
|
50 <option value="hg19">hg19</option>
|
|
51 <option value="ce10">ce10</option>
|
|
52 <option value="dm3">dm3</option>
|
|
53 <option value="mm9">mm9</option>
|
|
54 </param>
|
|
55
|
0
|
56 <conditional name="source">
|
|
57 <param name="ref_source" type="select" label="Reference genome">
|
|
58 <option value="cached">locally cached</option>
|
|
59 <option value="history">in your history</option>
|
|
60 </param>
|
|
61 <when value="cached">
|
|
62 <param name="input1_2bit" type="select" label="Using reference genome" help="If your genome of interest is not listed, contact your Galaxy team">
|
|
63 <options from_data_table="deepTools_seqs" />
|
|
64 </param>
|
|
65 </when>
|
|
66 <when value="history">
|
|
67 <param name="input1" type="data" format="twobit" label="Select a reference dataset in 2bit format" />
|
|
68 </when>
|
|
69 </conditional>
|
|
70
|
|
71 <param name="outFileFormat" type="select" label="File format of the output">
|
|
72 <option value="bam">bam</option>
|
|
73 <option value="bw">bigwig</option>
|
|
74 <option value="bg">bedgraph</option>
|
|
75 </param>
|
|
76
|
|
77 <conditional name="advancedOpt">
|
|
78 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
79 <option value="no" selected="true">no</option>
|
|
80 <option value="yes">yes</option>
|
|
81 </param>
|
|
82 <when value="no" />
|
|
83 <when value="yes">
|
|
84 <param name="region" type="text" value=""
|
|
85 label="Region of the genome to limit the operation to"
|
|
86 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"" />
|
|
87
|
|
88 <param name="binSize" type="integer" value="50" min="1"
|
|
89 label="Bin size in bp"
|
|
90 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
|
|
91 </when>
|
|
92 </conditional>
|
|
93 </inputs>
|
|
94
|
|
95 <outputs>
|
|
96 <data format="bam" name="outFileName">
|
|
97 <change_format>
|
|
98 <when input="outFileFormat" value="bw" format="bigwig" />
|
|
99 <when input="outFileFormat" value="bam" format="bam" />
|
|
100 <when input="outFileFormat" value="bg" format="bedgraph" />
|
|
101 </change_format>
|
|
102 </data>
|
|
103 </outputs>
|
|
104 <help>
|
|
105
|
|
106 **What it does**
|
|
107
|
5
|
108 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.
|
|
109 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
|
0
|
110 -----
|
|
111
|
|
112 .. class:: infomark
|
|
113
|
5
|
114 If you would like to give us feedback or you run into any trouble, please sent an email to deeptools@googlegroups.com
|
0
|
115
|
|
116 This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
|
|
117
|
|
118
|
|
119 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
|
|
120 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
|
|
121 .. _Fidel Ramirez: ramirez@ie-freiburg.mpg.de
|
|
122
|
|
123 </help>
|
|
124
|
|
125 </tool>
|