Mercurial > repos > iuc > newick_utils
comparison newick_display.xml @ 0:0db45bc4844f draft
planemo upload for repository https://github.com/tjunier/newick_utils commit e21a4f5dd923d549651f1a15c755e2de89cbd46d
| author | iuc |
|---|---|
| date | Mon, 01 Oct 2018 09:45:49 -0400 |
| parents | |
| children | 9298c1dbf31e |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:0db45bc4844f |
|---|---|
| 1 <tool id="newick_display" name="Newick Display" version="1.6"> | |
| 2 <description>visualize a phylogenetic tree</description> | |
| 3 <edam_operations> | |
| 4 <edam_operation>operation_0567</edam_operation> | |
| 5 </edam_operations> | |
| 6 <requirements> | |
| 7 <requirement type="package" version="1.6">newick_utils</requirement> | |
| 8 </requirements> | |
| 9 <command detect_errors="aggressive"><![CDATA[ | |
| 10 nw_display | |
| 11 #if $outformat != 'txt': | |
| 12 -s | |
| 13 #end if | |
| 14 $scalebar | |
| 15 -u '$legend' | |
| 16 -I 'r' | |
| 17 -i | |
| 18 #if $condbranchsupport.branchsupport == "true": | |
| 19 'fill:$condbranchsupport.supcolor; | |
| 20 font-size:$condbranchsupport.supfontsize; | |
| 21 transform:$condbranchsupport.suptransform;' | |
| 22 #else: | |
| 23 "visibility:hidden;" | |
| 24 #end if | |
| 25 -b | |
| 26 #if $condbranchlength.branchlength == "true": | |
| 27 'fill:$condbranchlength.lencolor; | |
| 28 font-size:$condbranchlength.lenfontsize; | |
| 29 transform:$condbranchlength.lentransform;' | |
| 30 #else: | |
| 31 "visibility:hidden;" | |
| 32 #end if | |
| 33 | |
| 34 -l 'font-family:$leafFont;font-size:$leafSize;' | |
| 35 -d "stroke:grey;fill:none;stroke-width:2;stoke-linecap:round;" | |
| 36 -w $width | |
| 37 $radial | |
| 38 | |
| 39 '$fileNewick' > output.svg | |
| 40 | |
| 41 #if $outformat == 'png': | |
| 42 && convert output.svg output.png | |
| 43 && mv output.png '$output' | |
| 44 #else: | |
| 45 && mv output.svg '$output' | |
| 46 #end if | |
| 47 | |
| 48 ]]></command> | |
| 49 <inputs> | |
| 50 <param name="fileNewick" format="txt,newick,nw,nwk,nhx,mothur.tre" type="data" label="Newick file"/> | |
| 51 <param name="scalebar" type="boolean" truevalue="" falsevalue="-S" checked="True" label="Display scale bar" /> | |
| 52 <param name="legend" type="text" value="" label="Unit name for the scale bar" /> | |
| 53 <param name="leafFont" type="text" value="sans-serif" label="Leaf font" /> | |
| 54 <param name="leafSize" type="text" value="10px" label="Leaf font-size" /> | |
| 55 <conditional name="condbranchsupport"> | |
| 56 <param name="branchsupport" type="select" label="Branch support"> | |
| 57 <option value="true">Display branch support</option> | |
| 58 <option value="false" selected="true">Hide branch support</option> | |
| 59 </param> | |
| 60 <when value="true"> | |
| 61 <param name="supcolor" type="color" value="red" label="color" /> | |
| 62 <param name="supfontsize" type="text" value="10px" label="font-size" /> | |
| 63 <param name="suptransform" type="text" value="translateY(1.5em)" label="move" /> | |
| 64 </when> | |
| 65 <when value="false" /> | |
| 66 </conditional> | |
| 67 <conditional name="condbranchlength"> | |
| 68 <param name="branchlength" type="select" label="Branch length"> | |
| 69 <option value="true">Display branch length</option> | |
| 70 <option value="false" selected="true">Hide branch length</option> | |
| 71 </param> | |
| 72 <when value="true"> | |
| 73 <param name="lencolor" type="color" value="blue" label="color" /> | |
| 74 <param name="lenfontsize" type="text" value="10px" label="font-size" /> | |
| 75 <param name="lentransform" type="text" value="translate(-1.5em,0em)" label="move" /> | |
| 76 </when> | |
| 77 <when value="false" /> | |
| 78 </conditional> | |
| 79 <param name="width" type="integer" value="800" label="Image width" help="in pixels for image output or in characters for text output" /> | |
| 80 <param name="radial" type="boolean" truevalue="-r" falsevalue="" checked="False" label="Draw a radial tree" /> | |
| 81 <param name="outformat" type="select" label="Choose an output format"> | |
| 82 <option value="svg" selected="true">SVG</option> | |
| 83 <option value="png">PNG</option> | |
| 84 <option value="txt">Text</option> | |
| 85 </param> | |
| 86 </inputs> | |
| 87 <outputs> | |
| 88 <data name="output" format="svg" label="${tool.name} on ${on_string}: Tree Graph" > | |
| 89 <change_format> | |
| 90 <when input="outformat" value="png" format="png"/> | |
| 91 <when input="outformat" value="txt" format="txt"/> | |
| 92 </change_format> | |
| 93 </data> | |
| 94 </outputs> | |
| 95 <tests> | |
| 96 <test> | |
| 97 <param name="fileNewick" value="tree.nwk"/> | |
| 98 <param name="width" value="400"/> | |
| 99 <param name="leafFont" value="courier"/> | |
| 100 <output name="output" file="tree.svg" ftype="svg" lines_diff="2"/> | |
| 101 </test> | |
| 102 <test><!-- test radial tree --> | |
| 103 <param name="fileNewick" value="tree.nwk"/> | |
| 104 <param name="radial" value="-r"/> | |
| 105 <param name="branchlength" value="true"/> | |
| 106 <output name="output" file="tree2.svg" ftype="svg" lines_diff="2"/> | |
| 107 </test> | |
| 108 <test><!-- test with png output format --> | |
| 109 <param name="fileNewick" value="tree.nwk"/> | |
| 110 <param name="radial" value="-r"/> | |
| 111 <param name="branchlength" value="true"/> | |
| 112 <param name="outformat" value="png"/> | |
| 113 <output name="output" file="tree.png" ftype="png" compare="sim_size" delta="15000"/> | |
| 114 </test> | |
| 115 <test><!-- test with txt output format --> | |
| 116 <param name="fileNewick" value="tree.nwk"/> | |
| 117 <param name="outformat" value="txt"/> | |
| 118 <output name="output" file="tree.txt" ftype="txt"/> | |
| 119 </test> | |
| 120 </tests> | |
| 121 <help><![CDATA[ | |
| 122 **What it does** | |
| 123 | |
| 124 This tool outputs a graph representing the tree, either as text or | |
| 125 as a SVG or PNG image. Underscores in labels are replaced with spaces. | |
| 126 Trees with no branch lengths are taken to be cladograms and are | |
| 127 drawn with leaves aligned. Otherwise, the tree is assumed to be a | |
| 128 phylogram: branch lengths are honored and a scale bar is drawn. | |
| 129 | |
| 130 .. image:: $PATH_TO_IMAGES/example.png | |
| 131 :alt: example newick tree graph | |
| 132 | |
| 133 ]]></help> | |
| 134 <citations> | |
| 135 <citation type="doi">10.1186/1748-7188-3-7</citation> | |
| 136 </citations> | |
| 137 </tool> |
