Mercurial > repos > bgruening > deeptools
comparison correctGCBias.xml @ 13:b4c5dd45778a draft
Uploaded
author | bgruening |
---|---|
date | Mon, 16 Dec 2013 04:36:19 -0500 |
parents | 135f3bae5c56 |
children | 5ea8782d650c |
comparison
equal
deleted
inserted
replaced
12:aea72b24dea0 | 13:b4c5dd45778a |
---|---|
3 <expand macro="requirements" /> | 3 <expand macro="requirements" /> |
4 <expand macro="stdio" /> | 4 <expand macro="stdio" /> |
5 <macros> | 5 <macros> |
6 <import>deepTools_macros.xml</import> | 6 <import>deepTools_macros.xml</import> |
7 </macros> | 7 </macros> |
8 <command> | 8 <command> |
9 #import tempfile | 9 #import tempfile |
10 #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) | 10 #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) |
11 | 11 |
12 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) | 12 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) |
13 #set $temp_bam_path = $temp_bam_handle.name + '.bam' | 13 #set $temp_bam_path = $temp_bam_handle.name + '.bam' |
14 #silent $temp_bam_handle.close() | 14 #silent $temp_bam_handle.close() |
15 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path)) | 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)) | 16 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path)) |
17 | 17 |
18 | 18 |
19 correctGCBias | 19 correctGCBias |
20 | 20 |
21 @THREADS@ | 21 @THREADS@ |
22 | 22 |
23 --bamfile '$temp_bam_path' | 23 --bamfile '$temp_bam_path' |
24 --GCbiasFrequenciesFile $GCbiasFrequenciesFile | 24 --GCbiasFrequenciesFile $GCbiasFrequenciesFile |
25 | 25 |
26 @reference_genome_source@ | 26 @reference_genome_source@ |
27 | 27 |
28 | 28 |
29 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific": | 29 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific": |
30 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize | 30 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize |
31 #else: | 31 #else: |
32 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt | 32 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt |
33 #end if | 33 #end if |
34 | 34 |
35 #if $advancedOpt.showAdvancedOpt == "yes": | |
36 #if str($advancedOpt.region.value) != '': | |
37 --region '$advancedOpt.region' | |
38 #end if | |
39 --binSize '$advancedOpt.binSize' | |
40 #end if | |
35 | 41 |
36 #if $advancedOpt.showAdvancedOpt == "yes": | 42 #set newoutFileName="corrected."+str($outFileFormat) |
37 #if str($advancedOpt.region.value) != '': | 43 --correctedFile $newoutFileName; |
38 --region '$advancedOpt.region' | |
39 #end if | |
40 | |
41 --binSize '$advancedOpt.binSize' | |
42 #end if | |
43 | |
44 #set newoutFileName="corrected."+str($outFileFormat) | |
45 | |
46 --correctedFile $newoutFileName; mv $newoutFileName $outFileName | |
47 | 44 |
48 </command> | 45 mv $newoutFileName $outFileName |
49 | 46 </command> |
50 <inputs> | 47 <inputs> |
51 | 48 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" /> |
52 <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" /> | 49 <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."/> |
53 | |
54 <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."/> | |
55 | |
56 <expand macro="reference_genome_source" /> | 50 <expand macro="reference_genome_source" /> |
57 <expand macro="effectiveGenomeSize" /> | 51 <expand macro="effectiveGenomeSize" /> |
58 | 52 |
59 <param name="outFileFormat" type="select" label="File format of the output"> | 53 <param name="outFileFormat" type="select" label="File format of the output"> |
60 <option value="bam">bam</option> | 54 <option value="bam">bam</option> |
61 <option value="bw">bigwig</option> | 55 <option value="bw">bigwig</option> |
62 <option value="bg">bedgraph</option> | 56 <option value="bg">bedgraph</option> |
63 </param> | 57 </param> |
64 | 58 |
65 <conditional name="advancedOpt"> | 59 <conditional name="advancedOpt"> |
66 <param name="showAdvancedOpt" type="select" label="Show advanced options" > | 60 <param name="showAdvancedOpt" type="select" label="Show advanced options" > |
67 <option value="no" selected="true">no</option> | 61 <option value="no" selected="true">no</option> |
68 <option value="yes">yes</option> | 62 <option value="yes">yes</option> |
69 </param> | 63 </param> |
70 <when value="no" /> | 64 <when value="no" /> |
71 <when value="yes"> | 65 <when value="yes"> |
72 <param name="region" type="text" value="" | 66 <param name="region" type="text" value="" |
73 label="Region of the genome to limit the operation to" | 67 label="Region of the genome to limit the operation to" |
74 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"" /> | 68 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"" /> |
75 | 69 |
76 <param name="binSize" type="integer" value="50" min="1" | 70 <param name="binSize" type="integer" value="50" min="1" |
77 label="Bin size in bp" | 71 label="Bin size in bp" |
78 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/> | 72 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/> |
79 </when> | 73 </when> |
80 </conditional> | 74 </conditional> |
81 </inputs> | 75 </inputs> |
82 | 76 <outputs> |
83 <outputs> | 77 <data format="bam" name="outFileName"> |
84 <data format="bam" name="outFileName"> | 78 <change_format> |
85 <change_format> | 79 <when input="outFileFormat" value="bw" format="bigwig" /> |
86 <when input="outFileFormat" value="bw" format="bigwig" /> | 80 <when input="outFileFormat" value="bam" format="bam" /> |
87 <when input="outFileFormat" value="bam" format="bam" /> | 81 <when input="outFileFormat" value="bg" format="bedgraph" /> |
88 <when input="outFileFormat" value="bg" format="bedgraph" /> | 82 </change_format> |
89 </change_format> | 83 </data> |
90 </data> | 84 </outputs> |
91 </outputs> | 85 <help> |
92 <help> | |
93 | 86 |
94 **What it does** | 87 **What it does** |
95 | 88 |
96 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. | 89 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. |
97 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on. | 90 The resulting BAM files can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on. |