BACKGROUND
motivation
evolutionary biologists now have to deal to an increasing extent with many phylogenetic trees and user-friendly bioinformatic tools are needed for handling large tree collections.
such tools are especially relevant for tasks that are cumbersome to perform manually, such as validating taxon names using a reference taxonomy, providing taxon sampling statistics, or pruning source trees so that they only contain taxa from a taxonomic group of interest.
such questions are crucial in phylogenomics, where phylogenies are mainly obtained by concatenating gene sequences into large molecular datasets  or by combining individual trees inferred separately on each gene .
several problems addressed here from a tree framework standpoint only take their constitutive taxa into account.
described solutions are thus also suitable for many other kinds of data , for which taxonomic representation is essential.
problems to solve
knowing how many different taxa belonging to a particular taxonomic group  are represented in a tree collection, determining how many trees contain at least one placental, finding these trees, and pruning them from every taxon except mammals are various tasks that cannot be performed without mapping user taxa to a reference taxonomy.
it is relatively complicated to compute such a mapping  <cit> , but the results can enable powerful tree search, while also providing pruning functions and relevant statistics.
dealing with taxon names
because of the multiplicity of phylogeny origins and the lack of a single reference taxonomic framework, some taxon names they host are often taxonomically invalid, misspelled, and/or supplemented with indications relative to primary data such as sequence accession numbers, geographical origins of the samples, marker identifiers, etc.
an initial step has thus to be performed to standardize names so that software analyzing the collection will not consider them as different taxa.
besides, mapping to proper scientific names may fail for some taxon names.
this problem has already been pointed out  <cit>  and was recently addressed for the treebase repository  <cit> .
indeed, treebase is a very helpful collaborative resource but it has been largely under-exploited, partly due to its lack of taxonomic consistency  <cit> .
obtaining statistics on taxon coverage in a tree collection
as the number of trees and considered taxa grows, statistics become crucial for depicting the collection content, and thus measuring its relevance for a given phylogenetic problem.
in a phylogenomic context, having hundreds of genes for dozens of taxa gives rise to simple, but fundamental questions, such as: how sparse is the dataset?
is the taxonomic sampling homogeneous among the main taxonomic groups?
how complete is the taxonomic coverage of the dataset?
how many genes provide information for a taxon that appeared in an unexpected position in the final phylogeny?
the frequency of appearance of each taxon, although useful, is less informative than a trees × taxa presence matrix.
such a data availability matrix  <cit>  clearly highlights under-represented taxa and provides an intuitive picture of the dataset sparseness.
however, it is not sufficient to grasp the taxonomic coverage of a given group.
finding trees with taxa of interest
with a large collection of trees at hand, a key task is to find those containing a relevant taxon sample with respect to a targeted biological question.
indeed, as the number of phylogenomic projects increases, it is becoming easier to access large datasets used in previous phylogenomic studies or stored in dedicated repositories such as treebase  <cit> , homolens  <cit> , treefam  <cit> , orthomam  <cit> , and ensembl  <cit> .
for example, when studying the phylogeny of rodents, one can be interested in isolating trees with at least four rodents from treebase or from databases developed from larger-scale phylogenomic analyses .
a tool for exploring tree collections should therefore incorporate a feature allowing complex queries on trees according to taxonomy.
pruning trees according to taxa of interest
even trees containing several relevant taxa may contain numerous additional taxa that are deemed irrelevant for subsequent analyses.
these useless parts should be pruned from trees both to speed the forthcoming analyses and to avoid interference with the signal of the core data to be analyzed.
it is thus useful to have a tool allowing automatic pruning of numerous source trees so that they will only contain taxa belonging to the taxonomic groups of interest.
implementation
taxon naming convention
in order to manage tree collections, taxon names first have to be identified and then placed in a reference taxonomic scheme.
phyloexplorer allows the user to choose between two such schemes: the ncbi taxonomy  <cit>  and the catalogue of life  <dig> annual checklist  <cit>  from the integrated taxonomic information system   <cit> .
most published phylogenies use a liberal naming scheme that combines taxonomic information with other kinds of information such as gene names, sequence identifiers or geographical origins.
for example, when a tree inferred using the brca <dig> gene contains a domestic mouse among its taxa, its label can be either: mouse, brca1_mouse, musmusculus_nm_ <dig>  and so on.
this freedom may allow the user to uncover some relevant information, but it also impedes simple automatic determination of the taxon represented by the given name.
we use a naming convention to facilitate this determination without any loss of generality.
the principle is to use separator characters chosen by the user to distinguish among the various pieces of information encompassed in the taxon name.
the complete name is thus split into several words, with the first ones being used to identify this taxon within the reference taxonomy while others can be used freely for storing any other kind of information.
we adopted this naming convention because it is so frequently used in treebase that it almost seems to be a de facto standard.
most taxonomic terms consist of a single word , but some consist of two distinct terms to reflect the linnean "genus-species" classification or to avoid ambiguity.
indeed, the reference taxonomy may contain ambiguous names because of name homonymy and synonymy.
for example, echinops is both a plant genus and a mammal genus.
in this case, two distinct taxa have the same genus name and additional information can be provided between "<" and ">" to overcome this ambiguity.
in the ncbi taxonomy, echinops is annotated as either "echinops < mammal >" or "echinops < plant >".
when a taxon name is composed of several words, phyloexplorer first checks if the whole name corresponds to a term of the reference taxonomy.
if the check fails, the last word is ignored and the thus-obtained shorter name is checked against the taxonomy – this shortening operation is repeated until the name is found within the taxonomy or is reduced to an empty string.
for example, the following names respect our naming convention: mus, mus_brca <dig>  mus_musculus_brca1_france, echinops_<mammal>_brca <dig>  when using the underscore character as a separator.
mapping treebase
phyloexplorer also proposes a function that allows users to perform taxonomic queries on trees stored in treebase  <cit> .
for this purpose, the content of treebase was obtained from its ftp server .
the  <dig>  studies available as of september  <dig>  containing a total of  <dig>  trees and  <dig>  taxa, were collected.
since the trees available in treebase have been provided by different scientists without adopting a common naming convention, a considerable proportion of the taxon names are not scientific names present in the reference taxonomies.
for treebase taxon names not present in the ncbi taxonomy , we relied on the tbmap tables which translate most treebase taxa into proper scientific names based on a number of taxonomic databases   <cit> .
this allowed identification of a further 8% of the taxon names.
phyloexplorer implementation overview
phyloexplorer is written in the python language and has been implemented according to the django web framework  <cit> .
django is a stable and powerful system that is able to handle thousands of page views per second and to associate a graphical user interface with complex manipulations of an underlying database.
in our case, the database is composed of relational tables encoding ncbi and itis taxonomies and a version of treebase curated as detailed above.
the database is handled by the mysql database management system  <cit> .
although a django project can consist of several applications, phyloexplorer has currently only one application called "djangophylocore".
"phylocore" is a wrapper of this library that enables users to access it outside any django project, i.e.
to use its facilities under the python interpreter as if it were a standard library.
the uml diagram structure of the "phylocore" library  is composed of several classes.
most of them allow interaction with the corresponding tables in the database since django imposes a class for each table of the database.
the class "tree" is used to store phylogenies as individual objects, including the newick format and other associated properties such as a name or the tree's rooting status.
"treecollection" is the main class of the project and allows storage of user tree collections, treebase itself, and sets of trees extracted from treebase through the querying system.
the queries are performed through functions of this class.
the "treecollection" class also provides functions to filter trees by pruning them  and to obtain statistics on taxon coverage among trees.
the "taxonomy" class references all taxa of the current reference taxonomy  as well as their synonyms, homonyms, and hierarchical relationships between higher-level taxa.
the "rank" class encodes the taxonomic rank of the taxa , exactly as in the itis database  <cit> .
the "taxonomyreference" class provides useful functions common to trees and tree collection querying facilities.
lastly, the "badtaxa" class stores taxa from currently managed tree collections that are not found in the chosen reference taxonomy.
the "phylocore" facilities can be accessed through a graphical interface provided by the phyloexplorer web server.
this server allows several users to simultaneously query "phylocore" and its database.
the web server was developed using the cherrypy object-oriented http framework for python  <cit> .
the networkx python package  <cit>  enables implementation of the browsable tree structures.
phyloexplorer relies on the phy.fi graphical tool  <cit>  for displaying labeled trees and also links to the phylowidget applet  <cit>  for a less static tree display.
taxon pictures are extracted from the corresponding wikispecies  <cit>  and wikipedia  <cit>  pages.
the phyloexplorer source code is distributed under the cecill license version  <dig>  <cit> , a french variant of the gnu gpl licence adopted by the centre national de la recherche scientifique .
it can be downloaded from the following google code project page: .
RESULTS
existing tools: software and websites
many software packages propose to display and handle single user trees or collections of trees such as the long-standing classic treeview  <cit> , the sophisticated treedyn  <cit>  and the rising star dendroscope  <cit> , among others.
websites aiming at interactively displaying phylogenetic trees, such as phy.fi  <cit> , itol  <cit>  and phylowidget  <cit> , for example, have also recently flourished.
however, most of these tools are tree rendering programs that only allow the user to graphically manage trees and associated annotations in some cases.
database orientated web servers such as treefam  <cit>  and phylofinder  <cit>  permit taxonomic querying and retrieval of phylogenetic trees from dedicated databases.
whereas others, like grunt  <cit>  and summary tree explorer  <cit> , implement some tree filtering and pruning features according to the taxonomy.
however, none of these latter tools can be used to upload and explore user phylogenies or obtain detailed summary statistics on user tree collections.
the only programs providing basic statistics on data availability are clann  <cit>  for tree collections in the context of supertree reconstruction, and phylota browser  <cit>  for molecular datasets.
in fact, phylofinder  <cit>  is the closest conceptually to the phyloexplorer tool presented here, but it is currently restricted to trees stored in treebase and does not allow obtaining taxonomic coverage statistics or performing complex taxonomic queries.
a brief overview of phyloexplorer
a typical use of phyloexplorer begins by uploading a tree collection on the website in newick or nexus format.
a simple taxon list can also be entered as a trivial multifurcated tree.
this allows users to deal with various kind of data , for which the taxonomic representation is important.
the trees are then parsed and taxon labels are mapped against scientific names from the chosen reference taxonomy  with listed homonyms and synonyms.
for automatic correction, the user is provided with a list of alternatives for up to ten unrecognized names.
the corresponding excerpt of the reference taxonomy, including only mapped taxa, is then displayed.
two statistics are provided at each taxonomic rank.
the first states the number of user trees containing a representative of the corresponding taxonomic group.
the second states the number of representatives of this taxonomic group encountered in the user tree collection.
each mapped taxon is provided with a link to the corresponding entry in the ncbi or itis database.
for pedagogical purposes, available pictures from wikispecies  <cit>  or wikipedia  <cit>  are popped up when browsing the taxonomic excerpt.
links to the corresponding ispecies  <cit>  and wikispecies  <cit>  pages are also provided for each taxon.
a taxa × trees matrix scoring the presence or absence of taxa in trees of the user collection can be generated to visualize the taxonomic overlap among trees.
the user can then perform several operations on the input collection, such as: browsing the taxonomy excerpt corresponding to each input tree; restricting its trees to a subset of species by a simple mouse click; mining a relevant subset of trees through a simple querying language; and locating trees in treebase matching taxa of the input collection.
mapping and correcting taxon names
when phyloexplorer is provided with a tree collection, either by simple upload or by searching treebase, every leaf label is mapped to terms contained in the reference taxonomy.
these terms include scientific and common names with their official taxonomic synonyms and homonyms.
the lack of a single universal reference taxonomy  <cit>  led us to consider several existing alternatives.
by relying on the comprehensive, widely used, and up to date ncbi and itis taxonomic projects, we hope to be able to fulfil a broad spectrum of evolutionary biologists' needs.
the phyloexplorer taxon naming facility helps to detect misspelled or taxonomically incorrect taxon names and proposes corrections according to known synonymies.
leaf labels that cannot be mapped to the reference taxonomy are listed, as well as those having an ambiguous taxonomic name.
as automatic correction is error prone, the user is prompted to correct problematic taxon names by selecting the appropriate name among close alternatives present in the reference taxonomy.
then phyloexplorer will automatically correct taxon names accordingly in the whole tree collection.
corrected trees can be downloaded afterwards, as well as the detailed list of corrections.
for example, we checked the 77-taxa metazoan phylogenetic tree from the recent study of dunn et al.
<cit>  .
using the ncbi reference taxonomy resulted in successful mapping of  <dig> leaf labels, including one homonym and three synonyms .
only one label  could not be found in the reference taxonomy because it represents an english common name for an unidentified member of the family mertensiidae.
phyloexplorer correctly suggested this name correction .
by contrast, when using itis as the reference taxonomy, only one synonym and  <dig> labels that could not be mapped were revealed .
this illustrates the differences in name mapping resulting from different taxonomic schemes.
we hope that semi-automating this fastidious, but nevertheless essential task will encourage researchers to check the validity of their trees before depositing them in phylogenetic tree databases such as treebase.
this tree proofing stage is much easier with phyloexplorer than with any other existing tool.
describing, browsing and restricting tree collections
as an illustration, we considered the collection of  <dig> individual gene trees from the phylogenomic study of delsuc et al.
<cit> .
this example is of particular interest because its trees contain both binomial species names and higher taxonomic rank names.
the latter labels designate chimerical taxa assembled from gene sequences of different representatives, as is often the case in supermatrix studies  <cit> .
once this collection has been uploaded, phyloexplorer produces simple statistics to depict it within the "statistics & queries" view.
both tree size and taxon frequency distributions are summarized through graphical plots .
the general information states that this dataset consists of a total of  <dig> trees containing  <dig> distinct taxa.
the tree size distribution indicates that the smallest tree contains  <dig> taxa.
the taxon frequency distribution reflects the substantial overlap among these trees, with no taxon appearing in less than  <dig> trees among  <dig> and most taxa occurring in more than a hundred different trees.
when selecting the "matrix trees × taxa" view, a data availability matrix is constructed from the collection .
this representation provides a general overview of the degree of overlap among trees from the collection in the form of a matrix scoring the presence  or absence  of each taxon in each tree.
this matrix can easily be browsed by pointing the mouse on each matrix cell to display its associated taxon and tree name information.
the detailed data availability matrix can also be downloaded in csv format  for use as supplementary material in supertree and supermatrix studies, for example.
by coming back to the "statistics & queries" view, a summary excerpt of the reference taxonomy containing all mapped taxa is provided as an interactive tree .
for educational purposes and to facilitate browsing of the taxonomy, images from wikispecies  <cit>  or wikipedia  <cit>  are automatically popped up when passing the mouse pointer over each taxonomic rank and taxon.
the summary excerpt indicates, for each taxonomic rank, the number of its representatives contained in the tree collection and the number of user trees in which members of this taxon are represented.
based on these indications, it can easily be seen that four different cnidarians are represented in the whole tree collection and that  <dig> trees contain at least one cnidarian.
a simple click on the first number allows the user to prune trees so that they only contain cnidarians, while clicking on the second will restrict the collection to the subset of trees containing at least one cnidarian.
this latter function allows the user to easily restricting the tree collection to subsets of trees containing members of a particular taxonomic group or a terminal taxon of interest.
phyloexplorer also enables more complex and flexible tree restrictions by selecting relevant taxa through the corresponding checkboxes.
once the internal nodes of interest are selected, phyloexplorer restricts the trees of the current collection to these taxa .
the summary statistics are updated accordingly, and the modified collection can then be browsed through the taxonomic excerpt and downloaded in newick format.
the "individual trees" view offers the option of browsing trees from the collection individually.
a list of all individual trees is given with links for displaying each tree using the phylowidget  <cit>  applet .
provided that trees have been named in the nexus formatted collection, individual trees are listed after this name.
once a particular tree is selected, i.e.
the tree from the if2p gene in the current example, its internal nodes are automatically labelled by phyloexplorer with taxonomic ranks when they can be unambiguously inferred.
the resulting decorated tree is rendered using phy.fi  <cit>  within the "image" tab.
the "browsable taxonomy excerpt" tab allows the user to browse the tree in the reference taxonomy context with taxon image pop-ups and links to the ispecies  <cit>  and wikispecies  <cit>  pages of each taxon .
finally, the "newick format" tab provides access to the labelled tree in newick format .
performing complex taxonomic queries on tree collections
finding a particular phylogeny in phylogenetic tree databases, or more generally in tree collections, is often like trying to find a needle in a haystack.
indeed, though confronted with phylogenetic tree databases containing thousands of trees, the user is usually offered only basic query capabilities.
recent efforts have been made in the right direction in the particular case of treebase with tools designed to taxonomically validate the trees   <cit>  and provide enhanced query options   <cit> .
however, a general system allowing complex taxonomic queries to be performed on taxonomically validated tree collections is still lacking.
phyloexplorer now offers this possibility.
for instance, we extracted a tree collection from the orthomam database  <cit>  by performing a request aimed at selecting trees inferred from slow evolving markers  of reasonable size .
this led to a collection of  <dig> trees which was uploaded into phyloexplorer .
this tree collection contains a total of  <dig> mammalian taxa for which complete genome sequences are available in the ensembl database  <cit> .
a question of primary interest in mammalian phylogenetics is the order in which diversification among the four major placental groups  occurred – a problem that is directly dependent upon the position of the placental root  <cit> .
when studying the position of the root of the placental tree, it is better to consider trees or molecular datasets containing at least six eutherians and one representative of each major placental clade, plus a marsupial or monotreme outgroup.
such trees can be located very easily in phyloexplorer by applying the following query to the orthomam trees under the "search trees" tab: {euarchontoglires}> <dig> and {laurasiatheria}> <dig> and {afrotheria}> <dig> and {xenarthra}> <dig> and  and {eutheria} >  <dig>  for each tree t of the current collection, phyloexplorer replaces {taxonomic_group} by the number of representatives of this taxonomic group within t. tree t matches the query if the resulting boolean expression is true.
the above query returned  <dig> candidate trees, while providing an even sampling of the major placental clades .
then, the user can conduct a supertree analysis from the indicated subcollection with an external tool.
alternatively, the user can collect the corresponding datasets in the orthomam database to construct a supermatrix with an optimal distribution of missing data with regards to the biological question at issue.
phyloexplorer's query language can also be used to mine trees from the tbmap-curated version of treebase.
the same request for mammalian trees on treebase results in  <dig> trees containing a total of  <dig> distinct taxa from which a supertree can be reconstructed.
this querying of treebase is also helpful for supermatrix studies, as primary data matrices can be downloaded from the treebase website once relevant study numbers have been identified thanks to phyloexplorer.
finally, the "pruning trees" tab provides an easy way to restrict tree collections by defining taxonomic filters.
once filters have been defined, trees can then be restricted to include only taxa respecting these filters, or alternatively be pruned from the taxa defined in these filters.
this function can be particularly useful for testing the influence of taxon sampling on diversification studies which require handling and statistical analysis of very large trees  <cit> .
measuring the taxonomic content and coverage of treebase
the tbmap-curated version of treebase  <cit>  we use includes  <dig>  trees.
however, its taxonomic coverage is highly irregular, with some groups being much more represented than others.
moreover, islands of taxa exist in which constitutive taxa are not linked by any tree to other taxa.
this has, in particular, been pointed out by page  <cit> , who provided several graphical views of the situation as of  <dig>  however, a more detailed and live picture can be obtained as treebase is available as a specific collection in phyloexplorer.
the complete treebase tree collection can be queried taxonomically from the phyloexplorer front page .
this enables the user to query and investigate its taxonomic coverage much more closely and dynamically than is possible when using the treebase website interface or even the phylofinder dedicated tool  <cit> .
note, however, that some taxa appearing in treebase cannot be mapped to our reference taxonomies despite the use of the tbmap-curated version of treebase  <cit> .
also, the query result depends on the chosen reference taxonomy.
for example, the simple query {mammalian}> <dig>  allows retrieving all trees from treebase that contain at least one mammal .
using the ncbi reference taxonomy results in  <dig> trees containing  <dig>  different labels of which  <dig>   are successfully mapped to  <dig>  distinct taxa .
whereas, using the itis reference taxonomy returns  <dig> trees containing  <dig>  different labels of which  <dig>   are successfully mapped to  <dig>  distinct taxa .
we plan to annually update the treebase content of our site.
educational value of the web server
phyloexplorer also provides a useful educational tool for assessing a taxonomic group that the user is not familiar with.
this feature could be of particular value when preparing practical courses for undergraduates.
indeed, when uploading a tree or a list of taxa of interest, phyloexplorer constructs an excerpted version of the corresponding taxonomic tree that can be browsed interactively.
internal nodes of the taxonomic excerpt tree are labelled by the name of the smallest taxonomic rank containing all taxa belonging to this group.
for example, phyloexplorer can be used to quickly view and browse the taxonomy of taxa represented in the ncbi trace archives  <cit> .
pictures of taxa available in wikispecies  <cit>  can be popped-up by positioning the mouse pointer over the corresponding taxon name.
clicking on taxon names will redirect the user to the full taxon description in the ncbi taxonomy browser  <cit> , which indicates the number of nucleotide sequences available for that particular taxon.
phyloexplorer also provides a link to automatically perform a search for each taxon in the ispecies engine  <cit> , which returns information on the geographic distribution, available pictures on the web, and associated bibliography.
a link is also given for each taxon to the corresponding wikispecies page for additional information.
taxon pictures are of great educational value in many cases in which a phylogeny is to be shown or described.
it is indeed common practice to display such taxon images at the tips of phylogenies in slide presentations, posters, and publications.
such pictures can be found on dedicated websites such as wikispecies or animal diversity web  <cit> , or through search engines such as ispecies.
however, manually typing each taxon name in these websites can be cumbersome and is prone to spelling errors.
phyloexplorer automates this task by providing a feature to get available pictures from wikispecies for all terminal taxa of an input tree or tree collection and for all taxa of a taxon list.
shifting to the "taxon images" view prompts phyloexplorer to display, by default, available images for the first  <dig> taxa.
annotated thumbnails of retrieved images are returned and the collection of full-size images can be viewed as a slide show .
a link is also provided to launch the search for all taxon images in a separate window of the browser.
the pictures can then be downloaded for direct use in scientific presentations and lectures.
an interactive tree viewer program like dendroscope  <cit>  can also directly upload these pictures for display at the tips of trees by mapping taxon names with image filenames.
CONCLUSIONS
combining user phylogenies with a reference taxonomy allows phyloexplorer to propose advanced facilities to taxonomically explore, correct, query and filter user tree collections.
various cumbersome operations currently performed by hand can thus be automated – in the best case – before publishing phylogenies in papers or repositories.
phyloexplorer's features are available through a simple interactive web interface.
in addition, the taxonomic querying system can also be applied to a tbmap-curated version of treebase  <cit>  which can thus be efficiently mined with respect to an input tree collection or to the user's interests.
we also hope that phyloexplorer will benefit the phylogenetic community as a tool to increase the taxonomic validity of trees submitted to phylogenetic tree databases.
this would greatly enhance the usefulness of such databases in meta-analyses.
moreover, by providing a powerful taxonomic query system that enables the mining of user collections or databases containing hundreds to thousands of trees, phyloexplorer could eventually be of great assistance to researchers interested in performing large-scale supertree and supermatrix analyses.
phyloexplorer's educational potential should also be underlined as it might be particularly helpful for preparing undergraduate courses and boosting public awarenes on taxonomy and phylogenetics.
possible developments of phyloexplorer include allowing users to upload their own custom reference taxonomic schemes, downloading standardised taxon image collections, adding more tree handling operations such as automatic re-rooting, and implementing topological queries.
availability and requirements
project name: phyloexplorer
project home page:
code available at:
operating system: platform independent
other requirements: none.
licence: cecill v <dig>
authors' contributions
vr initiated the project.
fd, vb, and vr supervised the project.
na, nc and sd, three master's students at university montpellier ii contributed to the implementation of the python library and the development of the first website version.
nc and vr wrote an updated version of the website.
sp, a master's student at university montpellier ii, extracted the trees from treebase and converted them according to the tbmap and catalogue of life resources.
fd provided the illustrative biological examples.
fd, vb and vr wrote the manuscript.
all authors read and approved the final manuscript.
supplementary material
additional file 1
77-taxon metazoan phylogenetic tree.
this file contains the metazoan phylogenetic tree obtained by dunn et al.
<cit>  in nexus format.
click here for file
additional file 2
collection of  <dig> phylogenetic trees.
this file contains the tree collection  from the phylogenomic study of delsuc et al.
<cit>  in nexus format.
click here for file
additional file 3
collection of  <dig> mammalian phylogenetic trees.
this file contains the mammalian tree collection  extracted from the orthomam database  <cit>  in nexus format.
click here for file
acknowledgements
we would like to thank khalid belkhir and alexandre dehne-garcia for their help in implementing the web server.
we also thank the anonymous reviewers for helpful comments which enabled many improvements to phyloexplorer.
this work has been supported by grants from the university montpellier ii scientific council and the french national research agency .
this is contribution isem 2009- <dig> of the institut des sciences de l'evolution de montpellier .

 motivation evolutionary biologists now have to deal to an increasing extent with many phylogenetic trees and user-friendly bioinformatic tools are needed for handling large tree collections. such tools are especially relevant for tasks that are cumbersome to perform manually, such as validating taxon names using a reference taxonomy, providing taxon sampling statistics, or pruning source trees so that they only contain taxa from a taxonomic group of interest. such questions are crucial in phylogenomics, where phylogenies are mainly obtained by concatenating gene sequences into large molecular datasets or by combining individual trees inferred separately on each gene. several problems addressed here from a tree framework standpoint only take their constitutive taxa into account. described solutions are thus also suitable for many other kinds of data, for which taxonomic representation is essential. problems to solve knowing how many different taxa belonging to a particular taxonomic group are represented in a tree collection, determining how many trees contain at least one placental, finding these trees, and pruning them from every taxon except mammals are various tasks that cannot be performed without mapping user taxa to a reference taxonomy. it is relatively complicated to compute such a mapping, but the results can enable powerful tree search, while also providing pruning functions and relevant statistics. dealing with taxon names because of the multiplicity of phylogeny origins and the lack of a single reference taxonomic framework, some taxon names they host are often taxonomically invalid, misspelled, and/or supplemented with indications relative to primary data such as sequence accession numbers, geographical origins of the samples, marker identifiers, etc. an initial step has thus to be performed to standardize names so that software analyzing the collection will not consider them as different taxa. besides, mapping to proper scientific names may fail for some taxon names. this problem has already been pointed out and was recently addressed for the treebase repository. indeed, treebase is a very helpful collaborative resource but it has been largely under-exploited, partly due to its lack of taxonomic consistency. obtaining statistics on taxon coverage in a tree collection as the number of trees and considered taxa grows, statistics become crucial for depicting the collection content, and thus measuring its relevance for a given phylogenetic problem. in a phylogenomic context, having hundreds of genes for dozens of taxa gives rise to simple, but fundamental questions, such as: how sparse is the dataset? is the taxonomic sampling homogeneous among the main taxonomic groups? how complete is the taxonomic coverage of the dataset? how many genes provide information for a taxon that appeared in an unexpected position in the final phylogeny? the frequency of appearance of each taxon, although useful, is less informative than a trees × taxa presence matrix. such a data availability matrix clearly highlights under-represented taxa and provides an intuitive picture of the dataset sparseness. however, it is not sufficient to grasp the taxonomic coverage of a given group. finding trees with taxa of interest with a large collection of trees at hand, a key task is to find those containing a relevant taxon sample with respect to a targeted biological question. indeed, as the number of phylogenomic projects increases, it is becoming easier to access large datasets used in previous phylogenomic studies or stored in dedicated repositories such as treebase, homolens, treefam, orthomam, and ensembl. for example, when studying the phylogeny of rodents, one can be interested in isolating trees with at least four rodents from treebase or from databases developed from larger-scale phylogenomic analyses. a tool for exploring tree collections should therefore incorporate a feature allowing complex queries on trees according to taxonomy. pruning trees according to taxa of interest even trees containing several relevant taxa may contain numerous additional taxa that are deemed irrelevant for subsequent analyses. these useless parts should be pruned from trees both to speed the forthcoming analyses and to avoid interference with the signal of the core data to be analyzed. it is thus useful to have a tool allowing automatic pruning of numerous source trees so that they will only contain taxa belonging to the taxonomic groups of interest. implementation taxon naming convention in order to manage tree collections, taxon names first have to be identified and then placed in a reference taxonomic scheme. phyloexplorer allows the user to choose between two such schemes: the ncbi taxonomy and the catalogue of life annual checklist from the integrated taxonomic information system. most published phylogenies use a liberal naming scheme that combines taxonomic information with other kinds of information such as gene names, sequence identifiers or geographical origins. for example, when a tree inferred using the brca gene contains a domestic mouse among its taxa, its label can be either: mouse, brca1_mouse, musmusculus_nm_ and so on. this freedom may allow the user to uncover some relevant information, but it also impedes simple automatic determination of the taxon represented by the given name. we use a naming convention to facilitate this determination without any loss of generality. the principle is to use separator characters chosen by the user to distinguish among the various pieces of information encompassed in the taxon name. the complete name is thus split into several words, with the first ones being used to identify this taxon within the reference taxonomy while others can be used freely for storing any other kind of information. we adopted this naming convention because it is so frequently used in treebase that it almost seems to be a de facto standard. most taxonomic terms consist of a single word, but some consist of two distinct terms to reflect the linnean "genus-species" classification or to avoid ambiguity. indeed, the reference taxonomy may contain ambiguous names because of name homonymy and synonymy. for example, echinops is both a plant genus and a mammal genus. in this case, two distinct taxa have the same genus name and additional information can be provided between "<" and ">" to overcome this ambiguity. in the ncbi taxonomy, echinops is annotated as either "echinops < mammal >" or "echinops < plant >". when a taxon name is composed of several words, phyloexplorer first checks if the whole name corresponds to a term of the reference taxonomy. if the check fails, the last word is ignored and the thus-obtained shorter name is checked against the taxonomy – this shortening operation is repeated until the name is found within the taxonomy or is reduced to an empty string. for example, the following names respect our naming convention: mus, mus_brca mus_musculus_brca1_france, echinops_<mammal>_brca when using the underscore character as a separator. mapping treebase phyloexplorer also proposes a function that allows users to perform taxonomic queries on trees stored in treebase. for this purpose, the content of treebase was obtained from its ftp server. the studies available as of september containing a total of trees and taxa, were collected. since the trees available in treebase have been provided by different scientists without adopting a common naming convention, a considerable proportion of the taxon names are not scientific names present in the reference taxonomies. for treebase taxon names not present in the ncbi taxonomy, we relied on the tbmap tables which translate most treebase taxa into proper scientific names based on a number of taxonomic databases. this allowed identification of a further 8% of the taxon names. phyloexplorer implementation overview phyloexplorer is written in the python language and has been implemented according to the django web framework. django is a stable and powerful system that is able to handle thousands of page views per second and to associate a graphical user interface with complex manipulations of an underlying database. in our case, the database is composed of relational tables encoding ncbi and itis taxonomies and a version of treebase curated as detailed above. the database is handled by the mysql database management system. although a django project can consist of several applications, phyloexplorer has currently only one application called "djangophylocore". "phylocore" is a wrapper of this library that enables users to access it outside any django project, i.e. to use its facilities under the python interpreter as if it were a standard library. the uml diagram structure of the "phylocore" library is composed of several classes. most of them allow interaction with the corresponding tables in the database since django imposes a class for each table of the database. the class "tree" is used to store phylogenies as individual objects, including the newick format and other associated properties such as a name or the tree's rooting status. "treecollection" is the main class of the project and allows storage of user tree collections, treebase itself, and sets of trees extracted from treebase through the querying system. the queries are performed through functions of this class. the "treecollection" class also provides functions to filter trees by pruning them and to obtain statistics on taxon coverage among trees. the "taxonomy" class references all taxa of the current reference taxonomy as well as their synonyms, homonyms, and hierarchical relationships between higher-level taxa. the "rank" class encodes the taxonomic rank of the taxa, exactly as in the itis database. the "taxonomyreference" class provides useful functions common to trees and tree collection querying facilities. lastly, the "badtaxa" class stores taxa from currently managed tree collections that are not found in the chosen reference taxonomy. the "phylocore" facilities can be accessed through a graphical interface provided by the phyloexplorer web server. this server allows several users to simultaneously query "phylocore" and its database. the web server was developed using the cherrypy object-oriented http framework for python. the networkx python package enables implementation of the browsable tree structures. phyloexplorer relies on the phy.fi graphical tool for displaying labeled trees and also links to the phylowidget applet for a less static tree display. taxon pictures are extracted from the corresponding wikispecies and wikipedia pages. the phyloexplorer source code is distributed under the cecill license version, a french variant of the gnu gpl licence adopted by the centre national de la recherche scientifique. it can be downloaded from the following google code project page:.  existing tools: software and websites many software packages propose to display and handle single user trees or collections of trees such as the long-standing classic treeview, the sophisticated treedyn and the rising star dendroscope, among others. websites aiming at interactively displaying phylogenetic trees, such as phy.fi, itol and phylowidget, for example, have also recently flourished. however, most of these tools are tree rendering programs that only allow the user to graphically manage trees and associated annotations in some cases. database orientated web servers such as treefam and phylofinder permit taxonomic querying and retrieval of phylogenetic trees from dedicated databases. whereas others, like grunt and summary tree explorer, implement some tree filtering and pruning features according to the taxonomy. however, none of these latter tools can be used to upload and explore user phylogenies or obtain detailed summary statistics on user tree collections. the only programs providing basic statistics on data availability are clann for tree collections in the context of supertree reconstruction, and phylota browser for molecular datasets. in fact, phylofinder is the closest conceptually to the phyloexplorer tool presented here, but it is currently restricted to trees stored in treebase and does not allow obtaining taxonomic coverage statistics or performing complex taxonomic queries. a brief overview of phyloexplorer a typical use of phyloexplorer begins by uploading a tree collection on the website in newick or nexus format. a simple taxon list can also be entered as a trivial multifurcated tree. this allows users to deal with various kind of data, for which the taxonomic representation is important. the trees are then parsed and taxon labels are mapped against scientific names from the chosen reference taxonomy with listed homonyms and synonyms. for automatic correction, the user is provided with a list of alternatives for up to ten unrecognized names. the corresponding excerpt of the reference taxonomy, including only mapped taxa, is then displayed. two statistics are provided at each taxonomic rank. the first states the number of user trees containing a representative of the corresponding taxonomic group. the second states the number of representatives of this taxonomic group encountered in the user tree collection. each mapped taxon is provided with a link to the corresponding entry in the ncbi or itis database. for pedagogical purposes, available pictures from wikispecies or wikipedia are popped up when browsing the taxonomic excerpt. links to the corresponding ispecies and wikispecies pages are also provided for each taxon. a taxa × trees matrix scoring the presence or absence of taxa in trees of the user collection can be generated to visualize the taxonomic overlap among trees. the user can then perform several operations on the input collection, such as: browsing the taxonomy excerpt corresponding to each input tree; restricting its trees to a subset of species by a simple mouse click; mining a relevant subset of trees through a simple querying language; and locating trees in treebase matching taxa of the input collection. mapping and correcting taxon names when phyloexplorer is provided with a tree collection, either by simple upload or by searching treebase, every leaf label is mapped to terms contained in the reference taxonomy. these terms include scientific and common names with their official taxonomic synonyms and homonyms. the lack of a single universal reference taxonomy led us to consider several existing alternatives. by relying on the comprehensive, widely used, and up to date ncbi and itis taxonomic projects, we hope to be able to fulfil a broad spectrum of evolutionary biologists' needs. the phyloexplorer taxon naming facility helps to detect misspelled or taxonomically incorrect taxon names and proposes corrections according to known synonymies. leaf labels that cannot be mapped to the reference taxonomy are listed, as well as those having an ambiguous taxonomic name. as automatic correction is error prone, the user is prompted to correct problematic taxon names by selecting the appropriate name among close alternatives present in the reference taxonomy. then phyloexplorer will automatically correct taxon names accordingly in the whole tree collection. corrected trees can be downloaded afterwards, as well as the detailed list of corrections. for example, we checked the 77-taxa metazoan phylogenetic tree from the recent study of dunn et al.. using the ncbi reference taxonomy resulted in successful mapping of leaf labels, including one homonym and three synonyms. only one label could not be found in the reference taxonomy because it represents an english common name for an unidentified member of the family mertensiidae. phyloexplorer correctly suggested this name correction. by contrast, when using itis as the reference taxonomy, only one synonym and labels that could not be mapped were revealed. this illustrates the differences in name mapping resulting from different taxonomic schemes. we hope that semi-automating this fastidious, but nevertheless essential task will encourage researchers to check the validity of their trees before depositing them in phylogenetic tree databases such as treebase. this tree proofing stage is much easier with phyloexplorer than with any other existing tool. describing, browsing and restricting tree collections as an illustration, we considered the collection of individual gene trees from the phylogenomic study of delsuc et al.. this example is of particular interest because its trees contain both binomial species names and higher taxonomic rank names. the latter labels designate chimerical taxa assembled from gene sequences of different representatives, as is often the case in supermatrix studies. once this collection has been uploaded, phyloexplorer produces simple statistics to depict it within the "statistics & queries" view. both tree size and taxon frequency distributions are summarized through graphical plots. the general information states that this dataset consists of a total of trees containing distinct taxa. the tree size distribution indicates that the smallest tree contains taxa. the taxon frequency distribution reflects the substantial overlap among these trees, with no taxon appearing in less than trees among and most taxa occurring in more than a hundred different trees. when selecting the "matrix trees × taxa" view, a data availability matrix is constructed from the collection. this representation provides a general overview of the degree of overlap among trees from the collection in the form of a matrix scoring the presence or absence of each taxon in each tree. this matrix can easily be browsed by pointing the mouse on each matrix cell to display its associated taxon and tree name information. the detailed data availability matrix can also be downloaded in csv format for use as supplementary material in supertree and supermatrix studies, for example. by coming back to the "statistics & queries" view, a summary excerpt of the reference taxonomy containing all mapped taxa is provided as an interactive tree. for educational purposes and to facilitate browsing of the taxonomy, images from wikispecies or wikipedia are automatically popped up when passing the mouse pointer over each taxonomic rank and taxon. the summary excerpt indicates, for each taxonomic rank, the number of its representatives contained in the tree collection and the number of user trees in which members of this taxon are represented. based on these indications, it can easily be seen that four different cnidarians are represented in the whole tree collection and that trees contain at least one cnidarian. a simple click on the first number allows the user to prune trees so that they only contain cnidarians, while clicking on the second will restrict the collection to the subset of trees containing at least one cnidarian. this latter function allows the user to easily restricting the tree collection to subsets of trees containing members of a particular taxonomic group or a terminal taxon of interest. phyloexplorer also enables more complex and flexible tree restrictions by selecting relevant taxa through the corresponding checkboxes. once the internal nodes of interest are selected, phyloexplorer restricts the trees of the current collection to these taxa. the summary statistics are updated accordingly, and the modified collection can then be browsed through the taxonomic excerpt and downloaded in newick format. the "individual trees" view offers the option of browsing trees from the collection individually. a list of all individual trees is given with links for displaying each tree using the phylowidget applet. provided that trees have been named in the nexus formatted collection, individual trees are listed after this name. once a particular tree is selected, i.e. the tree from the if2p gene in the current example, its internal nodes are automatically labelled by phyloexplorer with taxonomic ranks when they can be unambiguously inferred. the resulting decorated tree is rendered using phy.fi within the "image" tab. the "browsable taxonomy excerpt" tab allows the user to browse the tree in the reference taxonomy context with taxon image pop-ups and links to the ispecies and wikispecies pages of each taxon. finally, the "newick format" tab provides access to the labelled tree in newick format. performing complex taxonomic queries on tree collections finding a particular phylogeny in phylogenetic tree databases, or more generally in tree collections, is often like trying to find a needle in a haystack. indeed, though confronted with phylogenetic tree databases containing thousands of trees, the user is usually offered only basic query capabilities. recent efforts have been made in the right direction in the particular case of treebase with tools designed to taxonomically validate the trees and provide enhanced query options. however, a general system allowing complex taxonomic queries to be performed on taxonomically validated tree collections is still lacking. phyloexplorer now offers this possibility. for instance, we extracted a tree collection from the orthomam database by performing a request aimed at selecting trees inferred from slow evolving markers of reasonable size. this led to a collection of trees which was uploaded into phyloexplorer. this tree collection contains a total of mammalian taxa for which complete genome sequences are available in the ensembl database. a question of primary interest in mammalian phylogenetics is the order in which diversification among the four major placental groups occurred – a problem that is directly dependent upon the position of the placental root. when studying the position of the root of the placental tree, it is better to consider trees or molecular datasets containing at least six eutherians and one representative of each major placental clade, plus a marsupial or monotreme outgroup. such trees can be located very easily in phyloexplorer by applying the following query to the orthomam trees under the "search trees" tab: {euarchontoglires}> and {laurasiatheria}> and {afrotheria}> and {xenarthra}> and and {eutheria} > for each tree t of the current collection, phyloexplorer replaces {taxonomic_group} by the number of representatives of this taxonomic group within t. tree t matches the query if the resulting boolean expression is true. the above query returned candidate trees, while providing an even sampling of the major placental clades. then, the user can conduct a supertree analysis from the indicated subcollection with an external tool. alternatively, the user can collect the corresponding datasets in the orthomam database to construct a supermatrix with an optimal distribution of missing data with regards to the biological question at issue. phyloexplorer's query language can also be used to mine trees from the tbmap-curated version of treebase. the same request for mammalian trees on treebase results in trees containing a total of distinct taxa from which a supertree can be reconstructed. this querying of treebase is also helpful for supermatrix studies, as primary data matrices can be downloaded from the treebase website once relevant study numbers have been identified thanks to phyloexplorer. finally, the "pruning trees" tab provides an easy way to restrict tree collections by defining taxonomic filters. once filters have been defined, trees can then be restricted to include only taxa respecting these filters, or alternatively be pruned from the taxa defined in these filters. this function can be particularly useful for testing the influence of taxon sampling on diversification studies which require handling and statistical analysis of very large trees. measuring the taxonomic content and coverage of treebase the tbmap-curated version of treebase we use includes trees. however, its taxonomic coverage is highly irregular, with some groups being much more represented than others. moreover, islands of taxa exist in which constitutive taxa are not linked by any tree to other taxa. this has, in particular, been pointed out by page, who provided several graphical views of the situation as of however, a more detailed and live picture can be obtained as treebase is available as a specific collection in phyloexplorer. the complete treebase tree collection can be queried taxonomically from the phyloexplorer front page. this enables the user to query and investigate its taxonomic coverage much more closely and dynamically than is possible when using the treebase website interface or even the phylofinder dedicated tool. note, however, that some taxa appearing in treebase cannot be mapped to our reference taxonomies despite the use of the tbmap-curated version of treebase. also, the query result depends on the chosen reference taxonomy. for example, the simple query {mammalian}> allows retrieving all trees from treebase that contain at least one mammal. using the ncbi reference taxonomy results in trees containing different labels of which are successfully mapped to distinct taxa. whereas, using the itis reference taxonomy returns trees containing different labels of which are successfully mapped to distinct taxa. we plan to annually update the treebase content of our site. educational value of the web server phyloexplorer also provides a useful educational tool for assessing a taxonomic group that the user is not familiar with. this feature could be of particular value when preparing practical courses for undergraduates. indeed, when uploading a tree or a list of taxa of interest, phyloexplorer constructs an excerpted version of the corresponding taxonomic tree that can be browsed interactively. internal nodes of the taxonomic excerpt tree are labelled by the name of the smallest taxonomic rank containing all taxa belonging to this group. for example, phyloexplorer can be used to quickly view and browse the taxonomy of taxa represented in the ncbi trace archives. pictures of taxa available in wikispecies can be popped-up by positioning the mouse pointer over the corresponding taxon name. clicking on taxon names will redirect the user to the full taxon description in the ncbi taxonomy browser, which indicates the number of nucleotide sequences available for that particular taxon. phyloexplorer also provides a link to automatically perform a search for each taxon in the ispecies engine, which returns information on the geographic distribution, available pictures on the web, and associated bibliography. a link is also given for each taxon to the corresponding wikispecies page for additional information. taxon pictures are of great educational value in many cases in which a phylogeny is to be shown or described. it is indeed common practice to display such taxon images at the tips of phylogenies in slide presentations, posters, and publications. such pictures can be found on dedicated websites such as wikispecies or animal diversity web, or through search engines such as ispecies. however, manually typing each taxon name in these websites can be cumbersome and is prone to spelling errors. phyloexplorer automates this task by providing a feature to get available pictures from wikispecies for all terminal taxa of an input tree or tree collection and for all taxa of a taxon list. shifting to the "taxon images" view prompts phyloexplorer to display, by default, available images for the first taxa. annotated thumbnails of retrieved images are returned and the collection of full-size images can be viewed as a slide show. a link is also provided to launch the search for all taxon images in a separate window of the browser. the pictures can then be downloaded for direct use in scientific presentations and lectures. an interactive tree viewer program like dendroscope can also directly upload these pictures for display at the tips of trees by mapping taxon names with image filenames.  combining user phylogenies with a reference taxonomy allows phyloexplorer to propose advanced facilities to taxonomically explore, correct, query and filter user tree collections. various cumbersome operations currently performed by hand can thus be automated – in the best case – before publishing phylogenies in papers or repositories. phyloexplorer's features are available through a simple interactive web interface. in addition, the taxonomic querying system can also be applied to a tbmap-curated version of treebase which can thus be efficiently mined with respect to an input tree collection or to the user's interests. we also hope that phyloexplorer will benefit the phylogenetic community as a tool to increase the taxonomic validity of trees submitted to phylogenetic tree databases. this would greatly enhance the usefulness of such databases in meta-analyses. moreover, by providing a powerful taxonomic query system that enables the mining of user collections or databases containing hundreds to thousands of trees, phyloexplorer could eventually be of great assistance to researchers interested in performing large-scale supertree and supermatrix analyses. phyloexplorer's educational potential should also be underlined as it might be particularly helpful for preparing undergraduate courses and boosting public awarenes on taxonomy and phylogenetics. possible developments of phyloexplorer include allowing users to upload their own custom reference taxonomic schemes, downloading standardised taxon image collections, adding more tree handling operations such as automatic re-rooting, and implementing topological queries. availability and requirements project name: phyloexplorer project home page: code available at: operating system: platform independent other requirements: none. licence: cecill v authors' contributions vr initiated the project. fd, vb, and vr supervised the project. na, nc and sd, three master's students at university montpellier ii contributed to the implementation of the python library and the development of the first website version. nc and vr wrote an updated version of the website. sp, a master's student at university montpellier ii, extracted the trees from treebase and converted them according to the tbmap and catalogue of life resources. fd provided the illustrative biological examples. fd, vb and vr wrote the manuscript. all authors read and approved the final manuscript. supplementary material additional file 1 77-taxon metazoan phylogenetic tree. this file contains the metazoan phylogenetic tree obtained by dunn et al. in nexus format. click here for file additional file 2 collection of phylogenetic trees. this file contains the tree collection from the phylogenomic study of delsuc et al. in nexus format. click here for file additional file 3 collection of mammalian phylogenetic trees. this file contains the mammalian tree collection extracted from the orthomam database in nexus format. click here for file acknowledgements we would like to thank khalid belkhir and alexandre dehne-garcia for their help in implementing the web server. we also thank the anonymous reviewers for helpful comments which enabled many improvements to phyloexplorer. this work has been supported by grants from the university montpellier ii scientific council and the french national research agency. this is contribution isem 2009- of the institut des sciences de l'evolution de montpellier.
given an input collection of rooted trees, phyloexplorer provides facilities for obtaining statistics describing the collection, correcting invalid taxon names, extracting taxonomically relevant parts of the collection using a dedicated query language, and identifying related trees in the treebase database. however, no tool is currently available to facilitate the management of tree collections providing, for instance: standardisation of taxon names among trees with respect to a reference taxonomy; selection of relevant subsets of trees or sub-trees according to a taxonomic query; or simply computation of descriptive statistics on the collection. moreover, although several databases of phylogenetic trees exist, there is currently no easy way to find trees that are both relevant and complementary to a given collection of trees. phylogenetic trees must then be manipulated for subsequent inclusion in publications or analyses such as supertree inference and tree comparisons. we propose a tool to facilitate assessment and management of phylogenetic tree collections.
 many important problems in evolutionary biology require molecular phylogenies to be reconstructed. phylogenetic trees must then be manipulated for subsequent inclusion in publications or analyses such as supertree inference and tree comparisons. however, no tool is currently available to facilitate the management of tree collections providing, for instance: standardisation of taxon names among trees with respect to a reference taxonomy; selection of relevant subsets of trees or sub-trees according to a taxonomic query; or simply computation of descriptive statistics on the collection. moreover, although several databases of phylogenetic trees exist, there is currently no easy way to find trees that are both relevant and complementary to a given collection of trees.  we propose a tool to facilitate assessment and management of phylogenetic tree collections. given an input collection of rooted trees, phyloexplorer provides facilities for obtaining statistics describing the collection, correcting invalid taxon names, extracting taxonomically relevant parts of the collection using a dedicated query language, and identifying related trees in the treebase database.  phyloexplorer is a simple and interactive website implemented through underlying python libraries and mysql databases. it is available at: and the source code can be downloaded from:. 