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