Module:Sandbox/Jts1882/CladeN/doc

This is an old revision of this page, as edited by Jts1882 (talk | contribs) at 08:43, 28 May 2019 (add uses template styles). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This module is designed to be used with the CladeN template to draw phylogenetic trees or cladograms. The new template-module combination extends the feature available with the clade and cladex templates. As it replicates the behaviour of the clade and cladex templates it should be suitable for replacing them.

Additionally, the module as the code for a prototype [User:Jts1882/sandbox/templates/NewickConverter|NewickConverter] template, which converts Newick strings into clade structure. This is not to be used in wikipedia articles, but is a utility to help construct cladograms for inclusion in articles.

Usage

{{#invoke:Sandbox/Jts1882/CladeN|main|style={{{style}}}}}

Examples

Simple examples mimicking the clade template:

Example demonstrating more advanced features of cladeN:

Example demonstrating features available:

Template:CladeN
Demo
Node structure
label1

leaf 1


label2

leaf 2


label3
label A

leaf A


label B

leaf B


leaf 3 is a transcluded cladeN structure

(brackets)

 


Leaf styling
thicknessN

1 (default)



2



3


line thickness

colorN

black (default)



red



blue



 #00ff00



stateN

solid (default)



dotted



dashed



none



double


line styles

(branches)
node styling
thickness

I



J



K



color

A



B



C



state

X



Y



Z



(brackets)
newick
subtree
panthera


lion



jaguar



leopard




tiger

siberian



bengal




snow leopard




 expanded Newick string

string

((lion,jaguar,leopard),((siberian,bengal)tiger,snow leopard))panthera



paraphyly example 


Geraniales



Myrtales



x

Crossosomatales




Picramniales




Sapindales




Huerteales




Brassicales



Malvales






 paraphyletic group x



A cladogram illustrating cladeN features.

Technical background

The clade template has many features for customising the appearance. Using them optimally requires some understanding of how the template works. The cladogram is a table and the lines of the cladogram are borders of the cells.

Description Table cell structure Cladogram Code using clade template

A simple clade structure with a single child node (or leaf).

This is an HTML table with two rows and two colums. The the cells of the righthand column are merged using the rowspan attribute.

labelA

Leaf A

sublabelA
labelA

LeafA

sublabelA
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1=LeafA
}}

Replace LeafA with another clade structure.

A second HTML table is placed inside a the right-hand cell of the outer table.

labelA
label1 leaf1
sublabel1
label2 leaf2
sublabel2
sublabelA
labelA
label1

leaf1

sublabel1
label2

leaf2

sublabel2
sublabelA
{{cladeN |thickness=3
|label1=labelA
|sublabel1=sublabelA
|1={{cladeN |thickness=3
   |label1=label1
   |sublabel1=sublabel1
   |1=leaf1
   |label2=label2
   |sublabel2=sublabel2
   |2=leaf2
   }}
}}