Mercurial > repos > eric-rasche > circos
changeset 6:169adf243c0a draft
planemo upload for repository https://github.com/TAMU-CPT/galaxy-circos-tool commit ee1fa2dab456c14a2538eb66033614e14a21a2ec
author | eric-rasche |
---|---|
date | Sat, 10 Jun 2017 13:38:32 -0400 |
parents | b25b3518c2ce |
children | b72f2db6d417 |
files | circgraph.xml macros.xml macros_conffiles.xml |
diffstat | 3 files changed, 55 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/circgraph.xml Sat Jun 10 12:55:28 2017 -0400 +++ b/circgraph.xml Sat Jun 10 13:38:32 2017 -0400 @@ -14,20 +14,23 @@ ln -s $reference_genome.genome_fasta genomeref.fa; #end if - ## Process the karyotype.txt file - python $__tool_directory__/fasta-to-karyotype.py + #if $reference_genome.reference_genome_source != 'karyotype': + ## Process the karyotype.txt file + python $__tool_directory__/fasta-to-karyotype.py - #if str($reference_genome.reference_genome_source) == 'cached': - "${reference_genome.fasta_indexes.fields.path}" - #else if str($reference_genome.reference_genome_source) == 'history': - genomeref.fa - #end if + #if str($reference_genome.reference_genome_source) == 'cached': + "${reference_genome.fasta_indexes.fields.path}" + #else if str($reference_genome.reference_genome_source) == 'history': + genomeref.fa + #end if - #if $ideogram.bands: - "${ideogram.bands}" - #end if - - > circos/conf/karyotype.txt && + #if $ideogram.bands: + "${ideogram.bands}" + #end if + > circos/conf/karyotype.txt && + #else + cp $reference_genome.input_karyotype circos/conf/karyotype.txt && + #end if mv $circos_conf circos/conf/circos.conf && mv $ticks_conf circos/conf/ticks.conf && @@ -82,14 +85,24 @@ <param name="reference_genome_source" type="select" label="Reference Genome"> <option value="history" selected="True">From History</option> <option value="cached">Locally Cached</option> + <option value="karyotype">Karyotype</option> </param> <when value="cached"> <param name="fasta_indexes" type="select" label="Source FASTA Sequence"> <options from_data_table="all_fasta"/> </param> + <!-- TODO: multiple band files? --> + <param name="bands" type="data" format="bed6,bed12" optional="true" label="Cytogenetic Bands" + help="If defined, will display cytogenetic bands as part of the karyotype configuration"/> </when> <when value="history"> <param name="genome_fasta" type="data" format="fasta" label="Source FASTA Sequence"/> + <!-- TODO: multiple band files? --> + <param name="bands" type="data" format="bed6,bed12" optional="true" label="Cytogenetic Bands" + help="If defined, will display cytogenetic bands as part of the karyotype configuration"/> + </when> + <when value="karyotype"> + <param name="input_karyotype" type="data" format="tabular,txt" label="Karyotype Configuration"/> </when> </conditional> @@ -105,9 +118,6 @@ <param name="parallel" type="boolean" label="Parallel" truevalue="yes" falsevalue="no" help="When set to yes/true, labels will be perpendicular to the tangent of the circle at the location of the label. Otherwise, they will be parallel with the tangent of the circle"/> </section> - <!-- TODO: multiple band files? --> - <param name="bands" type="data" format="bed6,bed12" optional="true" label="Cytogenetic Bands" - help="If defined, will display cytogenetic bands as part of the karyotype configuration"/> </section> <section name="ticks" title="Ticks">
--- a/macros.xml Sat Jun 10 12:55:28 2017 -0400 +++ b/macros.xml Sat Jun 10 13:38:32 2017 -0400 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <macros> - <token name="@WRAPPER_VERSION@">0.9-RC1</token> + <token name="@WRAPPER_VERSION@">0.9-RC2</token> <xml name="requirements"> <requirements> <requirement type="package" version="0.69.4">circos</requirement> @@ -202,6 +202,7 @@ <repeat name="conditions" title="Conditions to Apply" help="Multiple conditions will be combined using AND"> <conditional name="application"> <param name="application_select" type="select" label="Condition"> + <option value="always">True / Always Applied</option> <option value="interchr">Interchromosomal</option> <option value="intrachr">Intrachromosomal</option> <option value="chr">Chromosome</option> @@ -253,6 +254,7 @@ <when value="inv"/> <when value="interchr"/> <when value="intrachr"/> + <when value="always"/> </conditional> </repeat> <repeat name="actions" title="Actions to Apply"> @@ -267,7 +269,20 @@ <param name="action_value" type="boolean" label="Show" truevalue="yes" falsevalue="no"/> </when> <when value="color"> - <expand macro="circos_color" label="Link Color" name="action_value"/> + <conditional name="dynamic"> + <param name="dynamic_select" type="select" label="Static / Dynamic Change"> + <option value="static">Static: Change is always applied</option> + <option value="dynamic">Dynamic: Change is sometimes applied</option> + </param> + <when value="static"> + <expand macro="circos_color" label="Link Color" name="action_value"/> + </when> + <when value="dynamic"> + <expand macro="brewer_scale" name="action_value" label="Fill Color"/> + <param name="min_value" type="float" value="-1" label="Expected minimum value of dataset"/> + <param name="max_value" type="float" value="1" label="Expected maximum value of dataset"/> + </when> + </conditional> </when> <when value="thickness"> <param name="action_value" type="integer" value="1" label="Thickness"/>
--- a/macros_conffiles.xml Sat Jun 10 12:55:28 2017 -0400 +++ b/macros_conffiles.xml Sat Jun 10 13:38:32 2017 -0400 @@ -249,6 +249,8 @@ #set cond = $condition.application.application_select #if $cond == 'interchr' or $cond == 'intrachr' or $cond == 'inv' or $cond == 'rev' condition = var($cond) + #elif $cond == 'always' + condition = 1 #else #set op = $condition.application.comparison.compare #set val = $condition.application.comparison.compval @@ -278,9 +280,18 @@ #set actiontype = $action.action.action_select #set actionval = $action.action.action_value #if $actiontype == 'color': - #set actionval = $circosColor($actionval) + #if $action.action.dynamic.dynamic_select == "static": + #set actionval = $circosColor($actionval) + $actiontype = $actionval + #else + #set x_fill_color = $action.action.dynamic.action_value + #set x_fill_color_count = int(str($x_fill_color).split('-')[1]) + 1 + #set x_fill_color_qw = ' '.join(["%s-%s" % ($action.action.dynamic.action_value, $i) for i in range(1, $x_fill_color_count)]) + $actiontype = eval(qw(${x_fill_color_qw})[remap_int(var(value), ${action.action.dynamic.min_value}, ${action.action.dynamic.max_value}, 0, ${x_fill_color_count - 1})]) + #end if + #else + $actiontype = $actionval #end if - $actiontype = $actionval #end for $rule.continue_flow