Mercurial > repos > iuc > circos
diff macros_conffiles.xml @ 6:740057a5126d draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 1584882716a1d2c598e8485da9d73bcf80d9b29a"
author | iuc |
---|---|
date | Fri, 01 May 2020 07:28:50 -0400 |
parents | a64dc31ab7f2 |
children |
line wrap: on
line diff
--- a/macros_conffiles.xml Thu Jan 23 07:27:22 2020 -0500 +++ b/macros_conffiles.xml Fri May 01 07:28:50 2020 -0400 @@ -7,6 +7,11 @@ <<include colors_fonts_patterns.conf>> <<include housekeeping.conf>> +max_ticks* = ${limits.max_ticks} +max_ideograms* = ${limits.max_ideograms} +max_links* = ${limits.max_links} +max_points_per_track* = ${limits.max_points_per_track} + <colors> <<include karyotype-colors.conf>> @@ -50,7 +55,8 @@ svg = yes #end if # by default angle = 0 is at 3 o'clock position - angle_offset = -90 + angle_offset = ${ideogram.angle_offset} + angle_orientation = ${ideogram.angle_orientation} auto_alpha_colors = yes auto_alpha_steps = 5 #if str($plot_options.background.background_select) == 'transparent': @@ -61,10 +67,20 @@ radius* = ${plot_options.radius}p </image> +<zooms> + #for zoom in $scaling.zooms: + <zoom> + chr = ${zoom.chr} + start = ${zoom.start}u + end = ${zoom.end}u + scale = ${zoom.scale} + </zoom> + #end for +</zooms> + <<include ticks.conf>> <<include ideogram.conf>> <<include data.conf>> -<<include highlight.conf>> <<include links.conf>> ]]></configfile> @@ -73,7 +89,7 @@ <configfile name="ticks_conf"><![CDATA[ @UTILS@ -show_ticks = ${ticks.show_ticks} +show_ticks = yes show_tick_labels = yes @@ -97,7 +113,7 @@ #for $tick_group in $ticks.tick_group: <tick> - spacing = ${tick_group.spacing} + spacing = ${tick_group.spacing}u size = ${tick_group.size}p show_label = ${tick_group.ticks.show_tick_labels} color = $circosColor($tick_group.color) @@ -131,7 +147,13 @@ <ideogram> <spacing> ## spacing between ideograms - default = ${ideogram.spacing}r + default = ${ideogram.spacing}u + + #for pairwise in $ideogram.pairwise_spacing + <pairwise ${pairwise.chr1} ${pairwise.chr2}> + spacing = ${pairwise.spacing}u + </pairwise> + #end for </spacing> # ideogram position, thickness and fill @@ -143,7 +165,7 @@ label_size = ${ideogram.ideogram_labels.size} label_parallel = ${ideogram.ideogram_labels.parallel} - #if $ideogram.bands.bands: + #if $ideogram.bands.show_bands: show_bands = yes #else show_bands = no @@ -157,77 +179,6 @@ </ideogram> ]]></configfile> </xml> - <xml name="configfile_highlight_conf"> - <configfile name="highlight_conf"><![CDATA[ -@UTILS@ -<highlights> -#for $hi, $data in enumerate($sec_highlight.data): - <highlight> - file = data/highlight-${hi}.txt # ${data.data_source.element_identifier} - r1 = ${data.r1}r - r0 = ${data.r0}r - fill_color = $circosColorAlpha($data.fill_color, $data.fill_color_alpha) - stroke_color = $circosColorAlpha($data.stroke_color, $data.stroke_color_alpha) - stroke_thickness = ${data.stroke_thickness} - - <rules> - #for $rule in $data.sec_rule.rules: - <rule> - #for $condition in $rule.conditions - #if str($condition.application.application_select) == "1": - condition = 1 - #elif str($condition.application.application_select) == "on": - condition = on($condition.application.on_genomes) - #elif str($condition.application.application_select) == "pos": - #if $condition.application.pos_gt: - condition = var(start) > $condition.application.pos_gt - #end if - - #if $condition.application.pos_lt: - #if $condition.application.pos_lt_sub == 'yes': - condition = var(end) < chrlen(var(chr)) - $condition.application.pos_lt - #else - condition = var(end) < $condition.application.pos_lt - #end if - #end if - #elif str($condition.application.application_select) == "value": - #if $condition.application.pos_gt: - condition = var(value) > $condition.application.pos_gt - #end if - - #if $condition.application.pos_lt: - condition = var(value) < $condition.application.pos_lt - #end if - #elif str($condition.application.application_select) == "var": - condition = var(${condition.application.varname}) ${condition.application.cond_select} "${condition.application.varvalue}" - #elif str($condition.application.application_select) == "random": - condition = rand() < ${condition.application.value} - #end if - #end for - - #for $action in $rule.actions: - #if str($action.action.action_select) == "fill_color_value" or str($action.action.action_select) == "color_value" : - #set x_fill_color = $action.action.action_value - #set x_fill_color_count = int(str($x_fill_color).split('-')[1]) - #set x_min = $x_fill_color_count if $action.action.invert else 1 - #set x_max = 1 if $action.action.invert else $x_fill_color_count - #set color_action = "fill_color" if str($plot_type) in ('histogram', 'histogram-stacked') else "color" - - $color_action = eval(sprintf("${action.action.action_value}-%d", remap_int(var(value), ${action.action.min_value}, ${action.action.max_value}, ${x_min}, ${x_max}))) - #else - $action.action.action_select = $circosColor($action.action.action_value) - #end if - #end for - $rule.continue_flow - </rule> - #end for - </rules> - </highlight> -#end for -</highlights> - ]]></configfile> - </xml> - <xml name="configfile_data_conf"> <configfile name="data_conf"><![CDATA[ @@ -240,11 +191,15 @@ file = data/data-${hi}.txt # ${data.plot_format.data_source.element_identifier} r1 = ${data.r1}r r0 = ${data.r0}r + #if str($data.zdepth) != '': + z = ${data.zdepth} + #end if orientation = ${data.orientation} #if str($data.minmax.minmax_select) == 'yes': min = ${$data.minmax.min_value} max = ${$data.minmax.max_value} #end if + minsize = ${data.minsize}u #if str($plot_type) in ('histogram', 'histogram-stacked'): type = histogram @@ -257,14 +212,27 @@ fill_under = ${data.plot_format.format_specific.fill_under} color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) thickness = ${data.plot_format.format_specific.stroke_thickness} +#else if str($plot_type) == 'highlight': + type = ${plot_type} + fill_color = $circosColorAlpha($data.plot_format.format_specific.fill_color, $data.plot_format.format_specific.fill_color_alpha) + color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) + thickness = ${data.plot_format.format_specific.stroke_thickness} #else if str($plot_type) == 'heatmap': type = ${plot_type} - color = ${data.plot_format.format_specific.fill_color} + color = ${data.plot_format.format_specific.color_scale.fill_color} + color_mapping = ${data.plot_format.format_specific.color_mapping} # http://www.circos.ca/documentation/tutorials/2d_tracks/heat_maps/ scale_log_base = ${data.plot_format.format_specific.scale_log_base} + stroke_color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) + stroke_thickness = ${data.plot_format.format_specific.stroke_thickness} #else if str($plot_type) == 'line': type = ${plot_type} - color = $circosColor($data.plot_format.format_specific.stroke_color) + color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) thickness = ${data.plot_format.format_specific.stroke_thickness} +#else if str($plot_type) == 'connector': + type = ${plot_type} + color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) + thickness = ${data.plot_format.format_specific.stroke_thickness} + connector_dims = ${data.plot_format.format_specific.connector_dims} #else if str($plot_type) == 'scatter': type = ${plot_type} glyph = ${data.plot_format.format_specific.glyph} @@ -276,13 +244,13 @@ # # Additionally it is named "color" in a scatter track whilst in the rule # you must override it with "fill_color" - color = $circosColor($data.plot_format.format_specific.fill_color) - stroke_color = $circosColor($data.plot_format.format_specific.stroke_color) + color = $circosColorAlpha($data.plot_format.format_specific.fill_color, $data.plot_format.format_specific.fill_color_alpha) + stroke_color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) stroke_thickness = ${data.plot_format.format_specific.stroke_thickness} #else if str($plot_type) == 'tile': type = ${plot_type} color = color-tile-$hi - stroke_color = $circosColor($data.plot_format.format_specific.stroke_color) + stroke_color = $circosColorAlpha($data.plot_format.format_specific.stroke_color, $data.plot_format.format_specific.stroke_color_alpha) stroke_thickness = ${data.plot_format.format_specific.stroke_thickness} layers = ${data.plot_format.format_specific.layers} thickness = ${data.plot_format.format_specific.thickness} @@ -324,36 +292,41 @@ <rule> # Workaround for above commented colour bug. condition = 1 - fill_color = $circosColor($data.plot_format.format_specific.fill_color) + fill_color = $circosColorAlpha($data.plot_format.format_specific.fill_color, $data.plot_format.format_specific.fill_color_alpha) flow = continue </rule> #end if #for $rule in $data.sec_rule.rules: <rule> #for $condition in $rule.conditions - #if str($condition.application.application_select) == "1": + #set cond = $condition.application.application_select + #if $cond == "always": condition = 1 - #elif str($condition.application.application_select) == "on": + #elif $cond == 'random' + condition = rand() < ${condition.application.value} + #elif $cond == "on": #set on_str = ' '.join([ "on(%s)" % $chr.strip() for $chr in $condition.application.on_genomes.split(',') ]) condition = $on_str - #elif str($condition.application.application_select) == "pos": - #if $condition.application.pos_gt: + #elif $cond == "pos": + #if str($condition.application.pos_gt) != '': condition = var(start) > $condition.application.pos_gt #end if - #if $condition.application.pos_lt: + #if str($condition.application.pos_lt) != '': condition = var(start) < $condition.application.pos_lt #end if - #elif str($condition.application.application_select) == "value": - #if $condition.application.pos_gt: + #elif $cond == "value": + #if str($condition.application.pos_gt) != '': condition = var(value) > $condition.application.pos_gt #end if - #if $condition.application.pos_lt: + #if str($condition.application.pos_lt) != '': condition = var(value) < $condition.application.pos_lt #end if - #elif str($condition.application.application_select) == "var": + #elif $cond == "var": condition = var(${condition.application.varname}) ${condition.application.cond_select} "${condition.application.varvalue}" + #else + condition = 0 # Error: the Galaxy devs forgot a case #end if #end for @@ -386,22 +359,39 @@ </rules> <axes> + #if str($data.sec_axes.only_if_data) == "data": + show = data + #end if #for $axis in $data.sec_axes.axes: <axis> - color = $circosColor($axis.color) + color = $circosColorAlpha($axis.color, $axis.color_alpha) thickness = ${axis.thickness} - spacing = ${axis.spacing}r + #if str($axis.radial_position.select) == 'plot': + spacing = ${axis.radial_position.spacing}r y0 = ${axis.y0}r y1 = ${axis.y1}r + #else: + spacing = ${axis.radial_position.spacing} + y0 = ${axis.y0} + y1 = ${axis.y1} + #end if </axis> #end for </axes> <backgrounds> + #if str($data.sec_bkgs.only_if_data) == "data": + show = data + #end if #for $bkg in $data.sec_bkgs.backgrounds: <background> - color = $circosColor($bkg.color) - y0 = ${bkg.y0}r - y1 = ${bkg.y1}r + color = $circosColorAlpha($bkg.color, $bkg.color_alpha) + #if str($bkg.radial_position.select) == 'plot': + y0 = ${bkg.radial_position.y0}r + y1 = ${bkg.radial_position.y1}r + #else: + y0 = ${bkg.radial_position.y0} + y1 = ${bkg.radial_position.y1} + #end if </background> #end for </backgrounds> @@ -419,7 +409,9 @@ <link> file = data/links-${hi}.txt # ${data.data_source.element_identifier} radius = ${data.radius}r + z = ${data.zdepth} ribbon = ${data.linktype.ribbon} + minsize = ${data.minsize}u #if $data.linktype.ribbon == 'yes' ${data.linktype.twist} #if $data.linktype.pattern != 'solid': @@ -437,34 +429,30 @@ perturb_bezier_radius = ${data.advanced.perturbation.perturb_bezier_radius_min},${data.advanced.perturbation.perturb_bezier_radius_max} perturb_bezier_radius_purity = ${data.advanced.perturbation.perturb_bezier_radius_purity_min},${data.advanced.perturbation.perturb_bezier_radius_purity_max} #end if - #if $data.advanced.zdepth - z = ${data.advanced.zdepth} - #end if <rules> #for $rule in $data.sec_link_rule.rules: <rule> #for $condition in $rule.conditions #set cond = $condition.application.application_select - #if $cond == 'interchr' or $cond == 'intrachr' or $cond == 'inv' or $cond == 'rev' - condition = var($cond) - #elif $cond == 'always' + #if $cond == 'always' condition = 1 #elif $cond == 'random' condition = rand() < ${condition.application.value} + #elif $cond == 'interchr' or $cond == 'intrachr' or $cond == 'inv' or $cond == 'rev' + condition = var($cond) #else #set op = $condition.application.comparison.compare #set val = $condition.application.comparison.compval #if $cond == 'chr' #if $op == 'between' or $op == 'fromto' #set val2 = $condition.application.comparison.compval2 - #set c=''.join([str($op),"(",str($val),",",str($val2),")"]) + condition = ${op}(${val}, ${val2}) #elif $op == 'on' - #set c='(var(chr1) eq "%s" or var(chr2) eq "%s")' % (str($val), str($val)) + condition = var(chr1) eq "${val}" or var(chr2) eq "${val}" #else - #set c=''.join([str($op),"(",str($val),")"]) + condition = ${op}(${val}) #end if - condition = $c #else #if $cond == 'dist' and $op == 'lt' condition = abs(var(pos1) - var(pos2)) < $val @@ -481,30 +469,27 @@ #for $action in $rule.actions: #set actiontype = $action.action.action_select - #if $actiontype == 'color': + #if $actiontype in ('color', 'stroke_color'): #if $action.action.dynamic.dynamic_select == "static": #set actionval = $circosColorAlpha($action.action.dynamic.action_value, $action.action.dynamic.action_value_alpha) $actiontype = $actionval - #else - #set x_fill_color = $action.action.dynamic.action_value - #set x_fill_color_count = int(str($x_fill_color).split('-')[1]) - #set x_min = $x_fill_color_count if $action.action.dynamic.invert else 1 - #set x_max = 1 if $action.action.dynamic.invert else $x_fill_color_count - - $actiontype = eval(sprintf("${action.action.dynamic.action_value}-%d", remap_int(var(value), ${action.action.dynamic.min_value}, ${action.action.dynamic.max_value}, ${x_min}, ${x_max}))) + #elif $action.action.dynamic.dynamic_select == 'source': + $actiontype = eval(var(chr1)) + #elif $action.action.dynamic.dynamic_select == 'dest': + $actiontype = eval(var(chr2)) #end if #elif $actiontype == 'z': #if $action.action.dynamic.dynamic_select == "static": - #set actionval = $action.action.dynamic.action_value - $actiontype = $actionval + $actiontype = ${action.action.dynamic.action_value} #else #set x_min = 1000 if $action.action.dynamic.invert else 1 #set x_max = 1 if $action.action.dynamic.invert else 1000 $actiontype = eval(remap_int(var(value), ${action.action.dynamic.min_value}, ${action.action.dynamic.max_value}, ${x_min}, ${x_max})) #end if + #elif $actiontype == 'value_from_attr': + value = var(${action.action.action_value}) #else - #set actionval = $action.action.action_value - $actiontype = $actionval + $actiontype = ${action.action.action_value} #end if #end for