Mercurial > repos > greg > gregs
comparison correctGCBias.xml @ 6:5742b322f956 draft default tip
Uploaded
author | greg |
---|---|
date | Tue, 10 Dec 2013 10:09:39 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5:a80606f72321 | 6:5742b322f956 |
---|---|
1 <tool id="deeptools_correctGCBias" name="correctGCBias" version="1.0.1"> | |
2 <description>uses the output from computeGCBias to generate corrected BAM files</description> | |
3 <expand macro="requirements" /> | |
4 <macros> | |
5 <import>deepTools_macros.xml</import> | |
6 </macros> | |
7 <command> | |
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 | |
18 correctGCBias | |
19 | |
20 @THREADS@ | |
21 | |
22 --bamfile '$temp_bam_path' | |
23 --GCbiasFrequenciesFile $GCbiasFrequenciesFile | |
24 | |
25 @reference_genome_source@ | |
26 | |
27 | |
28 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific": | |
29 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize | |
30 #else: | |
31 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt | |
32 #end if | |
33 | |
34 | |
35 #if $advancedOpt.showAdvancedOpt == "yes": | |
36 #if str($advancedOpt.region.value) != '': | |
37 --region '$advancedOpt.region' | |
38 #end if | |
39 | |
40 --binSize '$advancedOpt.binSize' | |
41 #end if | |
42 | |
43 #set newoutFileName="corrected."+str($outFileFormat) | |
44 | |
45 --correctedFile $newoutFileName; mv $newoutFileName $outFileName | |
46 | |
47 </command> | |
48 | |
49 <inputs> | |
50 | |
51 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" /> | |
52 | |
53 <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."/> | |
54 | |
55 <expand macro="reference_genome_source" /> | |
56 <expand macro="effectiveGenomeSize" /> | |
57 | |
58 <param name="outFileFormat" type="select" label="File format of the output"> | |
59 <option value="bam">bam</option> | |
60 <option value="bw">bigwig</option> | |
61 <option value="bg">bedgraph</option> | |
62 </param> | |
63 | |
64 <conditional name="advancedOpt"> | |
65 <param name="showAdvancedOpt" type="select" label="Show advanced options" > | |
66 <option value="no" selected="true">no</option> | |
67 <option value="yes">yes</option> | |
68 </param> | |
69 <when value="no" /> | |
70 <when value="yes"> | |
71 <param name="region" type="text" value="" | |
72 label="Region of the genome to limit the operation to" | |
73 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"" /> | |
74 | |
75 <param name="binSize" type="integer" value="50" min="1" | |
76 label="Bin size in bp" | |
77 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/> | |
78 </when> | |
79 </conditional> | |
80 </inputs> | |
81 | |
82 <outputs> | |
83 <data format="bam" name="outFileName"> | |
84 <change_format> | |
85 <when input="outFileFormat" value="bw" format="bigwig" /> | |
86 <when input="outFileFormat" value="bam" format="bam" /> | |
87 <when input="outFileFormat" value="bg" format="bedgraph" /> | |
88 </change_format> | |
89 </data> | |
90 </outputs> | |
91 <help> | |
92 | |
93 **What it does** | |
94 | |
95 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. | |
96 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on. | |
97 | |
98 **Output files**: | |
99 | |
100 - GC-normalized BAM file | |
101 | |
102 ----- | |
103 | |
104 .. class:: infomark | |
105 | |
106 @REFERENCES@ | |
107 | |
108 </help> | |
109 </tool> |