Mercurial > repos > bgruening > deeptools
comparison bamCorrelate.xml @ 14:b0d64a9930d6 draft
Uploaded
author | bgruening |
---|---|
date | Thu, 14 Nov 2013 05:43:15 -0500 |
parents | a68a771625d2 |
children | 351cd1f8791b |
comparison
equal
deleted
inserted
replaced
13:06311d89da81 | 14:b0d64a9930d6 |
---|---|
8 #import tempfile | 8 #import tempfile |
9 #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) | 9 #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) |
10 | 10 |
11 #set files=[] | 11 #set files=[] |
12 #set labels=[] | 12 #set labels=[] |
13 #for $i in $inputs | |
14 | 13 |
15 #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) | 14 @multiple_input_bams@ |
16 #set $temp_input_path = $temp_input_handle.name | |
17 #silent $temp_input_handle.close() | |
18 #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path)) | |
19 #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path)) | |
20 #silent $files.append('%s.bam' % $temp_input_path) | |
21 | |
22 ##set $files += [str($i.bamfile)] | |
23 #if str($i.label.value) != "": | |
24 #set $labels += ["\"%s\"" % ($i.label.value)] | |
25 #else | |
26 #set $labels += ["\"%s\"" % ($i.bamfile.name)] | |
27 #end if | |
28 #end for | |
29 | 15 |
30 bamCorrelate | 16 bamCorrelate |
31 | 17 |
32 @THREADS@ | 18 @THREADS@ |
33 | 19 |
82 </command> | 68 </command> |
83 | 69 |
84 <inputs> | 70 <inputs> |
85 <expand macro="multiple_input_bams" /> | 71 <expand macro="multiple_input_bams" /> |
86 | 72 |
87 <param name="fragmentLength" type="integer" value="300" min="1" | 73 <param name="fragmentLength" type="integer" value="300" min="1" |
88 label="Length of the average fragment size" | 74 label="Length of the average fragment size" |
89 help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> | 75 help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/> |
90 | 76 |
91 <param name="corMethod" type="select" label="Correlation method"> | 77 <param name="corMethod" type="select" label="Correlation method"> |
92 <option value="pearson">Pearson</option> | 78 <option value="pearson">Pearson</option> |
93 <option value="spearman">Spearman</option> | 79 <option value="spearman">Spearman</option> |
94 </param> | 80 </param> |
95 | 81 |
96 <conditional name="mode"> | 82 <conditional name="mode"> |
97 <param name="modeOpt" type="select" label="Choose computation mode" | 83 <param name="modeOpt" type="select" label="Choose computation mode" |
98 help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed."> | 84 help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed."> |
99 <option value="bins" selected="true">Bins</option> | 85 <option value="bins" selected="true">Bins</option> |
100 <option value="BED-file">Limit correlation to certain regions (BED file)</option> | 86 <option value="BED-file">Limit correlation to certain regions (BED file)</option> |
101 </param> | 87 </param> |
102 <when value="bins"> | 88 <when value="bins"> |
103 <param name="binSize" type="integer" value="10000" min="1" | 89 <param name="binSize" type="integer" value="10000" min="1" |
104 label="Bin size in bp" | 90 label="Bin size in bp" |
105 help="Length in base pairs for a window used to sample the genome."/> | 91 help="Length in base pairs for a window used to sample the genome."/> |
106 | 92 |
107 <param name="numberOfSamples" type="integer" value="100000" min="1" | 93 <param name="numberOfSamples" type="integer" value="100000" min="1" |
108 label="Number of samples" | 94 label="Number of samples" |
109 help="Number of samples taken from the genome to compute the scaling factors"/> | 95 help="Number of samples taken from the genome to compute the scaling factors"/> |
110 <expand macro="bamCorrelate_mode_actions" /> | 96 <expand macro="bamCorrelate_mode_actions" /> |
111 </when> | 97 </when> |
112 <when value="BED-file"> | 98 <when value="BED-file"> |
113 <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/> | 99 <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/> |
114 <expand macro="bamCorrelate_mode_actions" /> | 100 <expand macro="bamCorrelate_mode_actions" /> |
115 </when> | 101 </when> |
116 | 102 |
117 </conditional> | 103 </conditional> |
118 | 104 |
119 <conditional name="outputOpt"> | 105 <conditional name="outputOpt"> |
120 <param name="showOutputOpt" type="select" label="Show additional output options" > | 106 <param name="showOutputOpt" type="select" label="Show additional output options" > |
121 <option value="no" selected="true">no</option> | 107 <option value="no" selected="true">no</option> |
122 <option value="yes">yes</option> | 108 <option value="yes">yes</option> |
123 </param> | 109 </param> |
124 <when value="no" /> | 110 <when value="no" /> |
125 <when value="yes"> | 111 <when value="yes"> |
126 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/> | 112 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/> |
127 <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/> | 113 <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/> |
128 </when> | 114 </when> |
129 </conditional> | 115 </conditional> |
130 | 116 |
131 </inputs> | 117 </inputs> |
132 <outputs> | 118 <outputs> |
133 <data format="png" name="outFileName" /> | 119 <data format="png" name="outFileName" /> |
134 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts"> | 120 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts"> |