# HG changeset patch # User iuc # Date 1456912146 18000 # Node ID 50f204c821593b9db99d41aa2749f81a5ef3b72c # Parent 09552faff9c0b7b3941301f73665b630b7f8085c planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/taxonomy_krona_chart commit 70d4a2d1563e834d8394dce8017a1f0b7ad74f23 diff -r 09552faff9c0 -r 50f204c82159 taxonomy_krona_chart.xml --- a/taxonomy_krona_chart.xml Mon Aug 17 11:36:09 2015 -0400 +++ b/taxonomy_krona_chart.xml Wed Mar 02 04:49:06 2016 -0500 @@ -1,7 +1,7 @@ - + from taxonomic profile - krona + krona ktImportText | sed -n 's/.*\(KronaTools [[:digit:].]\{1,\}\).*/\1/p' @@ -10,10 +10,9 @@ #if $type_of_data.input[0].is_of_type('taxonomy'): ktImportGalaxy - -a -d "${type_of_data.max_rank}" -n "${root_name}" - -o ${output} + -o "${output}" ${combine_inputs} #for $input_count, $input_dataset in enumerate( $type_of_data.input ): "${input_dataset},${input_count}" @@ -22,9 +21,8 @@ #else: ktImportText - -a -n "${root_name}" - -o ${output} + -o "${output}" ${combine_inputs} #for $input_count, $input_dataset in enumerate( $type_of_data.input ): "${input_dataset},${input_count}" @@ -32,6 +30,7 @@ #end if +&& [ -d "${output}.files" ] && ( mkdir "${output.extra_files_path}" && mv "${output}.files" "${output.extra_files_path}/" ) ]]> @@ -72,7 +71,7 @@ - + @@ -94,7 +93,7 @@ This tool renders results of a metagenomic profiling as a zoomable pie chart using Krona_. -.. _Krona: http://sourceforge.net/p/krona/home/krona/ +.. _Krona: https://github.com/marbl/Krona/wiki ------ diff -r 09552faff9c0 -r 50f204c82159 test-data/krona_test1.html --- a/test-data/krona_test1.html Mon Aug 17 11:36:09 2015 -0400 +++ b/test-data/krona_test1.html Wed Mar 02 04:49:06 2016 -0500 @@ -76,7 +76,7 @@ // // FOR MORE INFORMATION VISIT // -// http://krona.sourceforge.net +// https://github.com/marbl/Krona/wiki/ // //----------------------------------------------------------------------------- } @@ -496,7 +496,77 @@ } } - if ( this != selectedNode && ! this.getCollapse() ) + if ( this.radial ) + { + var angleText = (angleStartCurrent + angleEndCurrent) / 2; + var radiusText = (gRadius + radiusInner) / 2; + + context.rotate(angleText); + context.beginPath(); + context.moveTo(radiusText, -fontSize); + context.lineTo(radiusText, fontSize); + context.lineTo(radiusText + centerX, fontSize); + context.lineTo(radiusText + centerX, -fontSize); + context.closePath(); + context.rotate(-angleText); + + if ( context.isPointInPath(mouseX - centerX, mouseY - centerY) ) + { + var label = String(this.getPercentage()) + '%' + ' ' + this.name; + + if ( this.searchResultChildren() ) + { + label += searchResultString(this.searchResultChildren()); + } + + if + ( + Math.sqrt((mouseX - centerX) * (mouseX - centerX) + (mouseY - centerY) * (mouseY - centerY)) < + radiusText + measureText(label) + ) + { + highlighted = true; + } + } + } + else + { + for ( var i = 0; i < this.hiddenLabels.length; i++ ) + { + var hiddenLabel = this.hiddenLabels[i]; + + context.rotate(hiddenLabel.angle); + context.beginPath(); + context.moveTo(gRadius, -fontSize); + context.lineTo(gRadius, fontSize); + context.lineTo(gRadius + centerX, fontSize); + context.lineTo(gRadius + centerX, -fontSize); + context.closePath(); + context.rotate(-hiddenLabel.angle); + + if ( context.isPointInPath(mouseX - centerX, mouseY - centerY) ) + { + var label = String(hiddenLabel.value) + ' more'; + + if ( hiddenLabel.search ) + { + label += searchResultString(hiddenLabel.search); + } + + if + ( + Math.sqrt((mouseX - centerX) * (mouseX - centerX) + (mouseY - centerY) * (mouseY - centerY)) < + gRadius + fontSize + measureText(label) + ) + { + highlighted = true; + break; + } + } + } + } + + if ( ! highlighted && this != selectedNode && ! this.getCollapse() ) { context.beginPath(); context.arc(0, 0, radiusInner, angleStartCurrent, angleEndCurrent, false); @@ -972,6 +1042,8 @@ } } + this.hiddenLabels = Array(); + if ( drawChildren ) { // draw children @@ -1122,6 +1194,14 @@ var textAngle = (angleStart + angleEnd) / 2; var labelRadius = gRadius + fontSize;//(radiusInner + radius) / 2; + var hiddenLabel = Array(); + + hiddenLabel.value = value; + hiddenLabel.angle = textAngle; + hiddenLabel.search = hiddenSearchResults; + + this.hiddenLabels.push(hiddenLabel); + drawTick(gRadius - fontSize * .75, fontSize * 1.5, textAngle); drawTextPolar ( @@ -2172,7 +2252,7 @@ { var nameWidthOld = this.nameWidth; - if ( ! this.radial )//&& fontSize != fontSizeLast ) + if ( true || ! this.radial )//&& fontSize != fontSizeLast ) { var dim = context.measureText(this.name); this.nameWidth = dim.width; @@ -3459,14 +3539,14 @@ } else { - logoImage = 'http://krona.sourceforge.net/img/logo.png'; + logoImage = 'http://marbl.github.io/Krona/img/logo-small.png'; } // document.getElementById('options').style.fontSize = '9pt'; position = addOptionElement ( position, -'
Krona
\ +'\ \  Search: \ \ @@ -3586,7 +3666,7 @@ ( position + 5, '', +onclick="window.open(\'https://github.com/marbl/Krona/wiki/Browsing%20Krona%20charts\', \'help\')"/>', 'Help' ); } @@ -4753,7 +4833,7 @@ { document.body.innerHTML = '\
This browser does not support HTML5 (see \ -Browser support).\ +Browser support).\ '; return; } @@ -4762,7 +4842,7 @@ { document.body.innerHTML = '\
This browser does not support HTML5 canvas text (see \ -Browser support).\ +Browser support).\ '; return; } @@ -6507,7 +6587,7 @@ - +
@@ -6532,47 +6612,23 @@ phylum 94 + subphylum 94 - subphylum 94 superclass + 94 class - 94 + superorder 94 - superorder - 94 + + IA_1-144417IA_1-278966IA_1-314709IA_1-324951IA_1-27817IA_1-95255IA_1-104173IA_1-135979IA_1-139090IA_1-139090IA_1-139090IA_1-144996IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-161439IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-216231IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-237681IA_1-250166IA_1-254274IA_1-254274IA_1-27817IA_1-29000IA_1-291427IA_1-291427IA_1-293054IA_1-293054IA_1-296315IA_1-296315IA_1-310974IA_1-310974IA_1-311282IA_1-311282IA_1-322295IA_1-42600IA_1-45102IA_1-45102IA_1-48105IA_1-48105IA_1-57254IA_1-61975IA_1-61975IA_1-66943IA_1-68288IA_1-82334IA_1-95526 + order - - 94 - suborder - - 94 - family - - subfamily - 94 - - genus - 94 - - IA_1-296315IA_1-322295 - - 2 - - species - 92 - - IA_1-144417IA_1-278966IA_1-314709IA_1-324951IA_1-27817IA_1-95255IA_1-104173IA_1-135979IA_1-139090IA_1-139090IA_1-139090IA_1-144996IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-160446IA_1-161439IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-190855IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-205154IA_1-216231IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-236286IA_1-237681IA_1-250166IA_1-254274IA_1-254274IA_1-27817IA_1-29000IA_1-291427IA_1-291427IA_1-293054IA_1-293054IA_1-296315IA_1-310974IA_1-310974IA_1-311282IA_1-311282IA_1-42600IA_1-45102IA_1-45102IA_1-48105IA_1-48105IA_1-57254IA_1-61975IA_1-61975IA_1-66943IA_1-68288IA_1-82334IA_1-95526 - - - - - - + 94 @@ -6582,8 +6638,8 @@ + 6 superkingdom - 6 6 phylum @@ -6597,8 +6653,8 @@ 6 family + 6 genus - 6 6 species