{ "v1_Abstract": "A major goal of many evolutionary analyses is to determine the true evolutionary history of an organism. Molecular methods that rely on the phylogenetic signal generated by a few to a handful of loci can be used to approximate the evolution of the entire organism but fall short of providing a global, genome\u00adwide, perspective on evolutionary processes. Indeed, individual genes in a genome may have different evolutionary histories. Therefore, it is informative to analyze the number and kind of phylogenetic topologies found within an orthologous set of genes across a genome. Here we present PhyBin: a flexible program for clustering gene trees based on topological structure. PhyBin can generate bins of topologies corresponding to exactly identical trees or can utilize Robinson\u00adFould\u2019s distance matrices to generate clusters of similar trees, using a user\u00addefined threshold. Additionally, PhyBin allows the user to adjust for potential noise in the dataset (as may be produced when comparing very closely related organisms) by pre\u00adprocessing trees to collapse very short branches or those nodes not meeting a defined bootstrap threshold. As a test case, we generated individual trees based on an orthologous gene set from 10 Wolbachia species across four different supergroups (A\u00adD) and utilized PhyBin to categorize the complete set of topologies produced from this dataset. Using this approach, we were able to show that although a single topology generally dominated the analysis, confirming the separation of the supergroups, many genes supported alternative evolutionary histories. Because PhyBin\u2019s output provides the user with lists of gene trees in each topological cluster, it can be used to explore potential reasons for discrepancies between phylogenies including homoplasies, long\u00adbranch attraction, or horizontal gene transfer events. Availability: PhyBin is a standalone open\u00adsource program available: http://hackage.haskell.org/package/phybin Introduction: The advent of genomic sequencing has produced a large amount of data available for phylogenetic analysis and many researchers have attempted to utilize the phylogenetic signal found across the bacterial genome to develop species trees (Daubin, Gouy et al. 2001; Sicheritz\u00adPonten and Andersson 2001; Daubin, Moran et al. 2003; Bapteste, Boucher et al. 2004; Zhaxybayeva, Gogarten et al. 2006; Ellegaard, Klasson et al. 2013). What has become clear from these analyses is that significant fractions of bacterial genomes do not follow the evolutionary history of their resident genome (Bapteste, Boucher et al. 2004). These rogue genes are potentially undergoing evolutionary processes distinct from those felt by the rest of the resident genome or have arrived there via horizontal gene transfer events. In order, then, to understand the evolution of the genome, it would be useful to achieve an understanding of the evolution of each gene in the genome. Previous work by Sicheritz\u00adPonten and Andersson presented scripts combined the existing utilities BLAST, Clustalw, Paup 4.0* to provide a complete pipeline from genome to tree\u00ad binning analysis (Sicheritz\u00adPonten and Andersson 2001). These kinds of complete solutions are 1", "v2_Abstract": "A major goal of many evolutionary analyses is to determine the true evolutionary history of an organism. Molecular methods that rely on the phylogenetic signal generated by a few to a handful of loci can be used to approximate the evolution of the entire organism but fall short of providing a global, genome-wide, perspective on evolutionary processes. Indeed, individual genes in a genome may have different evolutionary histories. Therefore, it is informative to analyze the number and kind of phylogenetic topologies found within an orthologous set of genes across a genome. Here we present PhyBin: a flexible program for clustering gene trees based on topological structure. PhyBin can generate bins of topologies corresponding to exactly identical trees or can utilize Robinson-Fould\u2019s distance matrices to generate clusters of similar trees, using a user-defined threshold. Additionally, PhyBin allows the user to adjust for potential noise in the dataset (as may be produced when comparing very closely related organisms) by pre-processing trees to collapse very short branches. As a test case, we generated individual trees based on an orthologous gene set from 10 Wolbachia species across four different supergroups (A-D) and utilized PhyBin to categorize the complete set of topologies produced from this dataset. Using this approach, we were able to show that although a single topology generally dominated the analysis, confirming the separation of the supergroups, many genes supported alternative evolutionary histories. Because PhyBin\u2019s output provides the user with lists of gene trees in each topological cluster, it can be used to explore potential reasons for discrepancies between phylogenies including homoplasies, long-branch attraction, or horizontal gene transfer events. Availability: PhyBin is a standalone open-source program available: http://hackage.haskell.org/package/phybin Introduction: The advent of genomic sequencing has produced a large amount of data available for phylogenetic analysis and many researchers have attempted to utilize the phylogenetic signal found across the bacterial genome to develop species trees (Daubin, Gouy et al. 2001; Sicheritz-Ponten and Andersson 2001; Daubin, Moran et al. 2003; Bapteste, Boucher et al. 2004; Zhaxybayeva, Gogarten et al. 2006; Ellegaard, Klasson et al. 2013). What has become clear from these analyses is that significant fractions of bacterial genomes do not follow the evolutionary history of their resident genome (Bapteste, Boucher et al. 2004). These rogue genes are potentially undergoing evolutionary processes distinct from those felt by the rest of the 1", "v1_text": "introduction: : The advent of genomic sequencing has produced a large amount of data available for phylogenetic analysis and many researchers have attempted to utilize the phylogenetic signal found across the bacterial genome to develop species trees (Daubin, Gouy et al. 2001; SicheritzPonten and Andersson 2001; Daubin, Moran et al. 2003; Bapteste, Boucher et al. 2004; Zhaxybayeva, Gogarten et al. 2006; Ellegaard, Klasson et al. 2013). What has become clear from these analyses is that significant fractions of bacterial genomes do not follow the evolutionary history of their resident genome (Bapteste, Boucher et al. 2004). These rogue genes are potentially undergoing evolutionary processes distinct from those felt by the rest of the resident genome or have arrived there via horizontal gene transfer events. In order, then, to understand the evolution of the genome, it would be useful to achieve an understanding of the evolution of each gene in the genome. Previous work by SicheritzPonten and Andersson presented scripts combined the existing utilities BLAST, Clustalw, Paup 4.0* to provide a complete pipeline from genome to tree binning analysis (SicheritzPonten and Andersson 2001). These kinds of complete solutions are 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t convenient but constrain the user to the specific utilities chosen by the authors for alignment and phylogeny generation. Here we present PhyBin, a computer program aimed at binning precomputed sets of non reticulated trees in Newick format, a file format produced by the majority of tree building software. PhyBin is a utility rather than a complete solution; it can serve as a component in many genomics pipelines, and provides a useful addition to the landscape of tools for dissecting and visualizing large numbers of trees. After the user applies their chosen ortholog prediction and treebuilding algorithms, PhyBin offers a quick way to visualize and browse the different evolutionary histories, either binned by topology and sorted by bin size, or in the form of a full hierarchical clustering based on RobinsonFoulds distance: i.e. a tree of trees. Method and Implementation: Generating orthologous sets and input trees Genomic sequences were downloaded from NCBI Microbial Genome Projects. The Wobachia species complex is made up of several major clades, called supergroups, designated by alphabetical letters (Baldo and Werren 2007). Accession numbers for the genomes analyzed here include: wUni and wVitA (submissions pending to genbank\u2019s ncbi), wBm (NC_006833.1), wPipPel (NC_010981.1), wHa (NC_021089.1), wRi (NC_012416.1), wMel (NC_002978.6), wNo (NC_021084.1), wAlbB (CAGB00000000.1), wBm (NC_006833.1), wOo (NC_018267.1). Orthologous gene sets were determined by Reciprocal Smallest Distance (RSD) algorithm (Wall, Fraser et al. 2003) with a 103 cutoff for significance threshold and alignment length threshold of 80%. Orthologs were then aligned using ClustalW (Larkin, Blackshields et al. 2007) and ML trees were generated using RAxML (Stamatakis 2006). The Newick format trees that resulted were used as input to PhyBin. The number of orthologous genes identified in this manner across all 10 taxa was 503. Description of the Program: PhyBin is a standalone commandline program, portable across all major operating systems. It runs in batchmode and is easily usable from scripts. PhyBin has two major modes: it can run very quickly and classify identical tree topologies into bins, or it can compute the distance (Robinson and Foulds 1981) between all pairs of trees and use that distance matrix to produce a configurable clustering of trees. Fast Binning Mode The key algorithm PhyBin performs in this mode is tree normalization, computing a rooted, ordered normal form for all inputs (which are labeled, unrooted, unordered tree topologies). Previous work in this area has described a number of viable normal forms (Chi, Yang et al. 2005). Conversion to a normal form ensures that all equivalent unrooted trees are converted into the same rooted tree, with a canonical root chosen. After conversion, the rooted trees are much faster to compare for equality than the unrooted trees would be, which enables fast binning. 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t PhyBin chooses the following strategy: it attempts to order subtrees by weight (number of tree nodes) and select the root node which is most balanced by weight (not depth)that is, which minimizes the maximum weight of any child of the root. Node labels are used only to ``break ties'' between equally weighted subtrees, or equally balanced roots. Because input trees in Newick format are typically labeled only on the leaves (taxa), PhyBin generates labels for intermediate nodes in the tree by creating a set of all the leaves contained in that subtree, given a root to determine up/down direction. This set can be represented as a bitvector and is also a key ingredient of computing RobinsonFoulds distance, which relies on identifying all such subsets (i.e. bipartitions induced by the tree). With labels for all nodes, equally weighted subtrees are ordered by label, and ties between potential roots are broken by comparing the labels of their children. Once input trees are normalized, testing for equality of two trees is as simple as comparing their representation in memory (a single, linear traversal). Normalization itself appears expensive due to the cost of labeling interior nodes with all leaves under them (O(N * I) for N taxa and I interior nodes), compounded by the fact that each intermediate node may have to consider each of its neighbors as a possible root and relabel itself b times in a tree of maximum branching factor b, yielding an O(N*I*b) asymptotic cost. However, in binning mode PhyBin runs much faster in the average case. One feature that enables PhyBin's efficiency is that it computes tree metadata interior labels and ``balanced'' ratingslazily, that is, on demand. Only when ``tie breaking'' is necessary between equallyweighted subtrees is an interior label computed at all. Likewise, only nodes ``near the center'' of the unrooted tree need to be considered for root status, those near the leaves need never be scored for balance. After normalization, PhyBin performs binning, which amounts to inserting all normalized trees into a data structure indexed by tree topology. We define a total order over normalized trees (made possible by labels), and thereby represent the table of bins as a sizebalanced binary tree supporting O(log(n)) insertion times. A hashtable would be an alternative, but the tree representation allows us to insert trees into the table without evaluating (forcing) unnecessary interior labels in the normal forms, whereas hashing requires traversing the entirety of each normalized tree to compute its hash. When execution completes, the contents of each bin are written out to disk, in addition to a visualization of a representative average tree for that topology, computed by averaging branch lengths of the bin members. PreProcessing Data PhyBin helps users extract a clean dataset and detect problems with the data, such as trees with mismatching numbers of taxa. In order to facilitate comparisons across trees with different taxon names (i.e. gene names), PhyBin can extract portions of designations or use a separate table of rules for mapping genes to taxa. In addition, PhyBin can restrict its analyses to a subset of taxon, ignoring others (prune). A problem with the simple binning approach is that it is fragile to minor differences in trees caused by noise (e.g. short length branches with high variability). This becomes increasingly problematic with large numbers of taxa, especially when closely related taxa (different strains) are compared. Fortunately, a simple preprocessing step that addresses this problem: PhyBin provides an option to collapse branches under two different conditions, a length threshold (for 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t example, a length threshold of 0.01 would collapse all branches less than 0.01, in their place inserting a star topology) or a bootstrap support threshold (such that nodes with less than that threshold would be collapsed and the branch lengths from the taxa to the parent node would be added). Full Clustering Mode using RobinsonFoulds Distance Matrix: PhyBin reimplements the HashRF algorithm for full alltoall Robinson Foulds distance (Sul and Williams 2007), which is significantly faster than computing the distance matrix with repeated comparison of individual trees (e.g. PAUP (Swofford and Sullivan 2009)). The HashRF algorithm is fast for today\u2019s data sizes (e.g. hundreds of taxa and thousands of trees), but is scales much more poorly than the basic binning algorithm at significantly larger sizes. Because ortholog sets across different genomic comparisons will produce trees with different taxon memberships (as a result of paralogs or gene losses), a user may consider decomposing their trees with other software solutions (such as treeKO, (MarcetHouben and Gabaldon 2011)). Further, PhyBin is also capable of directly comparing these trees with different numbers of taxa using the leaf pruning method implemented in STRAW (Shaw, Ruan et al. 2013). Specifically, in comparing trees with different taxa (tolerant mode), the program first removes taxa that are not contained within each tree. If the taxon removed is in a polytomy, the parent and sister taxon are unchanged. However, in a binary node, taxon pruning would remove the intermediate node, retaining the branch lengths from the ancestor to the unpruned taxon. The \u2013tolerant mode comes with a cost, however, as the more efficient HashRF algorithm cannot be used; instead Phybin falls back to the earlier PAUPstyle algorithm. A distance matrix alone is not directly useful for exploring the direct relationships between different gene trees. Thus, PhyBin uses the RobinsonFoulds distance matrix to compute a clustering of tree topologies, similar to the output of the simple binning mode, but able to identify trees that are merely similar, although not identical. A hierarchical clustering method is used. (If the user desires a different clustering method, they may use the distance matrix produced by PhyBin as input to a different processing pipeline.) With the hierarchical clustering method, there remain several clustering options to configure. The choice of clustering options can dramatically alter bin membership (Supplementary Table 1), and running with several different options is a good way to get a sense for the range of possible outcomes. Specifically, the user may define the edit distance tolerated within clusters by providing a threshold, and may choose single, complete, or UPGMA linkage for clustering. Also if desired, rather than viewing a flat clustering of trees, the user may directly view a hierarchical clustering of the trees as a dendrogram. We believe PhyBin is the first program to date to provide this treeoftrees output. Output Formats: PhyBin is meant to be used in scripts and by other programs. Every output produced by PhyBin goes into a separate, simple text filefor example, the consensus tree for each cluster and the 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t RobinsonFoulds distance matrix. Visualizations are produced separately and automatically in PDF files. performance: : There are very large differences in performance between existing programs for computing RobinsonFould\u2019s distance matrices. The fundamental datastructures in this problem domain are sets and finite maps, for which there are many alternate representations (bit vectors, hash tables, balanced trees, etc), providing a large space of possible implementations to explore. The sharpest contrast is between those programs that directly compare individual pairs of trees (PAUP, DendroPy), vs. those that insert all tree\u2019s bipartitions into a global structure and summarize it as a separate phase (e.g. HashRF). The later approach achieves much better cache locality. PhyBin is written in a very high level language, Haskell, which supports radical forms of optimization, including safe semiautomatic parallelism. PhyBin uses purely functional (immutable) datastructures for representing trees and their bipartitons; in particular it relies heavily on the balancedtree implementations Data.Map and Data.Set from the standard library. Nevertheless, when computing a matrix for a 150taxa, 100tree test (Table 1), PhyBin is 82 times faster than Philip (ANSI C) and 47.5 times faster than DendroPy (Python). However, PhyBin is still slower than HashRF by a factor of 2.8X4.8X. HashRF was the first implementation that introduced highperformance techniques for RF matrices, and it introduced the algorithm on which PhyBin\u2019s implementation is based. Unfortunately, the more widely used software (PAUP, DendroPy, Philip, etc), remains slow. HashRF, the currently available fast alternative, is delicate and must be used carefully (for example, an extra character of whitespace in the input file results in a segmentation fault with no error message in version 6.0.1). Additionally, because HashRF provides only the core RF distance computation, other tools are required for a biologist to be able to derive any conclusions from the output. As a final note on performance, PhyBin was straightforward to parallelize (using our \u201cLVar\u201d parallelism library) and achieves a 2.54X parallel speedup at four cores, and peaks at a 3.11X speedup at eight cores, making it a bit faster than HashRF on our target platform (Table 1). Future work will focus on reducing contention on shared data structures to improve scaling. Results and Discussion: We used PhyBin to identify how many phylogenies within the Wolbachia orthologous gene set support the supergroup divisions proposed by multilocus sequence typing (Baldo and Werren 2007). For comparative purposes in this analysis, a phylogeny for these 10 taxa was created using the concatenated, orthologous gene set (Figure 1A). In actuality, PhyBin does not require an expectation for tree topology and searches through tree space for distinct topological categories. As an illustration of PhyBin\u2019s ability to reduce the noise in a dataset produced by small branch lengths (i.e., closely related taxa), we used the program in binning mode on the set of Wolbachia orthologs under increasing branch length thresholds (Table 2). We chose a threshold of 0.01 for our dataset as the average branch length over the entire set of validated trees was 0.04 with minimum and maximum branch lengths of 0 and 2.31, respectively. Using this threshold, in 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t binning mode, the largest bin contains a topology that agrees with that of the published supergroups (133 members in largest bin, 175 total bins, Table 2, Figure 1B). However, 174 other potential topologies exist in the dataset with 129 alternative topologies supported by only a single ortholog tree (Table 2). In order to better explore this tree set, we took advantage of PhyBin\u2019s ability to generate a distance matrix for all trees. By calculating the RobinsonFoulds (RF) distance between all trees, we can better assess the differences between clusters in the tree dataset. For example, by increasing the RFdistance threshold to 2 and using the averageneighbor clustering algorithm to group our trees, the number of clusters drops dramatically to only 77 with the largest cluster containing a majority (72%) of genes. Again, this topology agrees with the published supergroup data and our result from the binning approach (Figure 1C). Increasing the RFdistance threshold further provides increasing stringency in the detection of aberrant phylogenies \u2013 topologies not falling into the largest cluster at larger distance thresholds are likely to represent genes of interest in comparing evolutionary trajectories of these supergroups. To test this hypothesis, we identified those Wolbachia genes that continue to display alternative evolutionary histories (that is, falling outside of the majority) even when clustering trees using increasingly large RF distances (Figure 2B, Table 3). As expected, a large number of distinct topologies are not inconsistent with the supergroup clades (65 distinct tree clusters do not support the major topology, using an RFdistance threshold of 1 and a branch length cutoff of 0.02, Table 3, Figure 2B). We further investigated the ortholog set supporting the dissolution of supergroup A (Table 4). Interestingly, a majority of these orthologs are predicted to be secreted (using the Effective database predictions of sec signal or eukaryotic domains (Jehl, Arnold et al. 2011), suggesting that perhaps interaction with the host would drive some of these orthologs in a different evolutionary direction compared to their resident genome. Another test of PhyBin\u2019s ability to detect orthologs under different evolutionary pressures would focus on the Wolbachia prophage, a mobile genetic element known to undergo horizontal transmission between strains (Bordenstein and Wernegreen 2004; Chafee, Funk et al. 2010; Kent and Bordenstein 2010; Kent, Salichos et al. 2011). However, these phage orthologs do not occur across all of our 10 taxa included here and are therefore not suitable for testing support for the supergroups. In conclusion, we PhyBin is a new software program that efficiently and quickly groups phylogenies either by strict topological congruence or by clustering using RF distance. We believe that this tool, due to its ease of use, its speed, and informative output, will be of interest to evolutionary biologists and bioinformaticians alike. Figure Legends: Figure 1. In each of two modes (full clustering and binning) PhyBin is able to correctly recover the expected topology for the Wolbachia pipientis orthologs used herein. (A) Concatenated phylogeny based on 508 genes (using RAxML GTRGAMMA, bootstrap support based on 10,000 replicates). The four major supergroups are highlighted and denoted. (B) These same groups are recovered when PhyBin is run in either binning mode or (C) full clustering mode. Figure 2. RobinsonFoulds distance matricies produced by PhyBin are also visualized as a dendrogram by the software. (A) A tree of trees for the Wolbachia ortholog set (508 trees), clustered using an edit distance of 0, where identical topologies (nodes \u2013 grey ovals) are shown connected by a red line. Length of the branches connecting each node is proportional to the RF distance. (B) This dendogram is simplified by increasing the RF distance at which the 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t trees are clustered (shown RF = 3). The top 10 clusters and their support different topologies are colored as indicated in the legend (with largest bin size for each cluster cluster in parentheses). 243 244 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t phybin : Table 4. List of Wolbachia orthologous gene sets not conforming to the dominant topology when PhyBin is run using full clustering mode (--UPGMA, --editdist=3). Protein products predicted to be secreted (based on screening using the Effective database ( Jehl, Arnold et al. 2011 ) are italicized. PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t Table 4. List of Wolbachia orthologous gene sets not conforming to the dominant topology when PhyBin is run using full clustering mode (UPGMA, editdist=3). Protein products predicted to be secreted (based on screening using the Effective database (Jehl, Arnold et al. 2011)) are italicized. Topology group Orthologs (using wMel designations) Support for splitting group A Major facilitator family transporter (WD0470) Diaminopimelate epimerase (WD1208) GTP cyclohydrolase (WD0003) Metalopeptidase (WD0059) Periplasmic divalent cation tolerance (WD0828) RodA (WD1108) 1 2 3 PeerJ reviewing PDF | (v2013:07:679:1:1:NEW 23 Sep 2013) R ev ie w in g M an us cr ip t", "v2_text": "results and discussion: : We used PhyBin to identify how many phylogenies within the Wolbachia orthologous gene set support the supergroup divisions proposed by multi-locus sequence typing (Baldo and Werren 2007). For comparative purposes in this analysis, a phylogeny for these 10 taxa was created using the concatenated, orthologous gene set (Figure 1A). In actuality, PhyBin does not require an expectation for tree topology and searches through tree space for distinct topological categories. As an illustration of PhyBin\u2019s ability to reduce the noise in a dataset produced by small branch lengths (i.e., closely related taxa), we used the program in binning mode on the set of Wolbachia orthologs under increasing branch length thresholds (Table 2). We chose a threshold of 0.01 for our dataset as the average branch length over the entire set of validated trees was 0.04 with minimum and maximum branch lengths 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t of 0 and 2.31, respectively. Using this threshold, in binning mode, the largest bin contains a topology that agrees with that of the published supergroups (Figure 1B). However, 174 other potential topologies exist in the dataset with 129 alternative topologies supported by only a single ortholog tree. In order to better explore this tree set, we took advantage of PhyBin\u2019s ability to generate a distance matrix for all trees. By calculating the Robinson-Foulds (RF) distance between all trees, we can better assess the differences between clusters in the tree dataset. For example, by increasing the RF-distance threshold to 2 and using the average-neighbor clustering algorithm to group our trees, the number of clusters drops dramatically to only 77 with the largest cluster containing a majority (72%) of genes. Again, this topology agrees with the published supergroup data and our result from the binning approach (Figure 1C). Increasing the RF-distance threshold further provides increasing stringency in the detection of aberrant phylogenies \u2013 topologies not falling into the largest cluster at larger distance thresholds are likely to represent genes of interest in comparing evolutionary trajectories of these supergroups. To test this hypothesis, we identified those Wolbachia genes that continue to display alternative evolutionary histories (that is, falling outside of the majority) even when clustering trees using increasingly large RF distances (Figure 2B, Table 3). As expected, a large number of distinct topologies are not inconsistent with the supergroup clades (Figure 2B). We further investigated the ortholog set supporting the dissolution of supergroup A (Table 4). Interestingly, a majority of these orthologs are predicted to be secreted (using the Effective database predictions of sec signal or eukaryotic domains (Jehl, Arnold et al. 2011), suggesting that perhaps interaction with the host would drive some of these orthologs in a different evolutionary direction compared to their resident genome. Another test of PhyBin\u2019s ability to detect orthologs under different evolutionary pressures would focus on the Wolbachia prophage, a mobile genetic element known to undergo horizontal transmission between strains (Bordenstein and Wernegreen 2004; Chafee, Funk et al. 2010; Kent and Bordenstein 2010)(Kent, Salichos et al. 2011). However, these phage orthologs do not occur across all of our 10 taxa included here and are therefore not suitable for testing support for the supergroups. In conclusion, we PhyBin is a new software program that efficiently and quickly groups phylogenies either by strict topological congruence or by clustering using RF distance. We believe that this tool, due to its ease of use, its speed, and informative output, will be of interest to evolutionary biologists and bioinformaticians alike. figure legends: : Figure 1. In each of two modes (full clustering and binning) PhyBin is able to correctly recover the expected topology for the Wolbachia pipientis orthologs used herein. (A) 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t Concatenated phylogeny based on 508 genes (using RAxML GTRGAMMA, bootstrap support based on 10,000 replicates). The four major supergroups are highlighted and denoted. (B) These same groups are recovered when PhyBin is run in either binning mode or (C) full clustering mode. Figure 2. Robinson-Foulds distance matricies produced by PhyBin are also visualized as a dendrogram by the software. (A) A tree of trees for the Wolbachia ortholog set (508 trees), clustered using an edit distance of 0, where identical topologies (nodes \u2013 grey ovals) are shown connected by a red line. Length of the branches connecting each node is proportional to the RF distance. (B) This dendogram is simplified by increasing the RF distance at which the trees are clustered (shown RF = 3). The top 10 clusters are colored and support different topologies, indicated in the legend. 256 257 258 259 260 261 262 263 264 265 266 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t introduction: : The advent of genomic sequencing has produced a large amount of data available for phylogenetic analysis and many researchers have attempted to utilize the phylogenetic signal found across the bacterial genome to develop species trees (Daubin, Gouy et al. 2001; Sicheritz-Ponten and Andersson 2001; Daubin, Moran et al. 2003; Bapteste, Boucher et al. 2004; Zhaxybayeva, Gogarten et al. 2006; Ellegaard, Klasson et al. 2013). What has become clear from these analyses is that significant fractions of bacterial genomes do not follow the evolutionary history of their resident genome (Bapteste, Boucher et al. 2004). These rogue genes are potentially undergoing evolutionary processes distinct from those felt by the rest of the 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t resident genome or have arrived there via horizontal gene transfer events. In order, then, to understand the evolution of the genome, it would be useful to achieve an understanding of the evolution of each gene in the genome. Previous work by Sicheritz-Ponten and Andersson presented scripts combined the existing utilities BLAST, Clustalw, Paup 4.0* to provide a complete pipeline from genome to tree-binning analysis (Sicheritz-Ponten and Andersson 2001). These kinds of complete solutions are convenient but constrain the user to the specific utilities chosen by the authors for alignment and phylogeny generation. Here we present PhyBin, a computer program aimed at binning precomputed sets of trees in Newick format, a file format produced by the majority of tree building software. PhyBin is a utility rather than a complete solution; it can serve as a component in many genomics pipelines, and provides a useful addition to the landscape of tools for dissecting and visualizing large numbers of trees. After the user applies their chosen ortholog prediction and tree-building algorithms, PhyBin offers a quick way to visualize and browse the different evolutionary histories, either binned by topology and sorted by bin size, or in the form of a full hierarchical clustering based on Robinson-Foulds distance: i.e. a tree of trees. method and implementation: : Generating orthologous sets and input trees Genomic sequences were downloaded from NCBI Microbial Genome Projects. The Wobachia species complex is made up of several major clades, called supergroups, designated by alphabetical letters (Baldo and Werren 2007). Accession numbers for the genomes analyzed here include: wUni and wVitA (submissions pending to genbank\u2019s ncbi), wBm (NC_006833.1), wPip-Pel (NC_010981.1), wHa (NC_021089.1), wRi (NC_012416.1), wMel (NC_002978.6), wNo (NC_021084.1), wAlbB (CAGB00000000.1), wBm (NC_006833.1), wOo (NC_018267.1). Orthologous gene sets were determined by Reciprocal Smallest Distance (RSD) algorithm (Wall, Fraser et al. 2003) with a 103 cutoff for significance threshold and alignment length threshold of 80%. Orthologs were then aligned using ClustalW (Larkin, Blackshields et al. 2007) and ML trees were generated using RAxML (Stamatakis 2006). The Newick format trees that resulted were used as input to PhyBin. The number of orthologous genes identified in this manner across all 10 taxa was 503. description of the program: : PhyBin is a standalone command-line program, portable across all major operating systems. It runs in batch-mode and is easily usable from scripts. PhyBin has two major modes: it can run very quickly and classify identical tree topologies into bins, or it can compute the distance (Robinson and Foulds 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t 1981) between all pairs of trees and use that distance matrix to produce a configurable clustering of trees. fast binning mode : The key algorithm PhyBin performs in this mode is tree normalization, computing a rooted, ordered normal form for all inputs (which are labeled, unrooted, unordered tree topologies). Previous work in this area has described a number of viable normal forms (Chi, Yang et al. 2005). PhyBin chooses the following strategy: it attempts to order subtrees by weight (number of tree nodes) and select the root node which is most balanced by weight (not depth)---that is, which minimizes the maximum weight of any child of the root. Node labels are used only to ``break ties'' between equally weighted subtrees, or equally balanced roots. Because input trees in Newick format are typically labeled only on the leaves (taxa), PhyBin generates labels for intermediate nodes in the tree by creating a set of all the leaves contained in that subtree, given a root to determine up/down direction. This set can be represented as a bit-vector and is also a key ingredient of computing Robinson-Foulds distance, which relies on identifying all such subsets (i.e. bipartitions induced by the tree). With labels for all nodes, equally weighted subtrees are ordered by label, and ties between potential roots are broken by comparing the labels of their children. Once input trees are normalized, comparing their topologies is as simple as comparing their representation in memory (a single, linear traversal). Normalization itself appears expensive due to the cost of labeling interior nodes with all leaves under them (O(N * I) for N taxa and I interior nodes), compounded by the fact that each intermediate node may have to consider each of its neighbors as a possible root and relabel itself b times in a tree of maximum branching factor b, yielding an O(N*I*b) asymptotic cost. However, in binning mode PhyBin runs much faster in the average case. One feature that enables PhyBin's efficiency is that it computes tree metadata---interior labels and ``balanced'' ratings---lazily, that is, on demand. Only when ``tie breaking'' is necessary between equally-weighted subtrees is an interior label computed at all. Likewise, only nodes ``near the center'' of the unrooted tree need to be considered for root status, those near the leaves need never be scored for balance. Next PhyBin does the binning, which amounts to inserting all normalized trees into a data structure indexed by tree topology. We define a total order over normalized trees (made possible by labels), and thereby represent the table of bins as a size-balanced binary tree supporting O(log(n)) insertion times. A hash-table would be an alternative, but the tree representation allows us to insert trees into the table without evaluating (forcing) unnecessary interior labels in the normal forms, whereas hashing requires traversing the entirety of each normalized tree to compute its hash. When execution completes, the contents of each bin are written out to disk, in 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t addition to a visualization of a representative average tree for that topology, computed by averaging branch lengths of the bin members. pre-processing data : PhyBin helps users extract a clean dataset and detect problems with the data, such as trees with mismatching numbers of taxa. In order to facilitate comparisons across trees with different taxon names (i.e. gene names), PhyBin can extract portions of designations or use a separate table of rules for mapping genes to taxa. A problem with the simple binning approach is that it is fragile to minor differences in trees caused by noise (e.g. short length branches with high variability). This becomes increasingly problematic with large numbers of taxa, especially when closely related taxa (different strains) are compared. Fortunately, a simple pre-processing step that addresses this problem: PhyBin provides an option to collapse branches under a length threshold (for example, a length threshold of 0.01 would collapse all branches less than 0.01, in their place inserting a star topology). full clustering mode using robinson-foulds distance matrix: : PhyBin reimplements the HashRF algorithm for full all-to-all Robinson Foulds distance (Sul and Williams 2007), which is significantly faster than computing the distance matrix with repeated comparison of individual trees (e.g. PAUP (Swofford and Sullivan 2009)). The HashRF algorithm is fast for today\u2019s data sizes (e.g. hundreds of taxa and thousands of trees), but is scales much more poorly than the basic binning algorithm at significantly larger sizes. A distance matrix alone is not directly useful for exploring the direct relationships between different gene trees. Thus, PhyBin uses the Robinson-Foulds distance matrix to compute a clustering of tree topologies, similar to the output of the simple binning mode, but able to identify trees that are merely similar, although not identical. The user may define the edit distance tolerated within clusters by providing a threshold, and may choose single, complete, or UPGMA linkage for clustering. Also if desired, rather than viewing a flat clustering of trees, the user may directly view a hierarchical clustering of the trees as a dendrogram. We believe PhyBin is the first program to date to provide this tree-of-trees output. output formats: : PhyBin is meant to be used in scripts and by other programs. Every output produced by PhyBin goes into a separate, simple text file---for example, the consensus tree for each cluster and the Robinson-Foulds distance matrix. Visualizations are produced separately and automatically in PDF files. performance: : There are very large differences in performance between existing programs for computing Robinson-Fould\u2019s distance matrices. The fundamental 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t data-structures in this problem domain are sets and finite maps, for which there are many alternate representations (bit vectors, hash tables, balanced trees, etc), providing a large space of possible implementations to explore. The sharpest contrast is between those programs that directly compare individual pairs of trees, vs. those that insert all tree\u2019s bipartitions into a global structure and summarize it as a separate phase (e.g. HashRF). The later approach achieves much better cache locality. PhyBin is written in a very high level language, Haskell, which supports radical forms of optimization, including safe semi-automatic parallelism. PhyBin uses purely functional (immutable) data-structures for representing trees and their bipartitons; in particular it relies heavily on the balanced-tree implementations Data.Map and Data.Set from the standard library. Nevertheless, when computing a matrix for a 150-taxa, 100-tree test (Table 1), PhyBin is 82 times faster than Philip (ANSI C) and 47.5 times faster than DendroPy (Python). However, PhyBin is still slower than HashRF by a factor of 2.8X-4.8X. HashRF is the implementation that introduced high-performance techniques for RF matrices, and developed the algorithm on which PhyBin\u2019s is based. Unfortunately, the widely used software (PAUP, DendroPy, Philip, etc), remains slow HashRF, the currently available fast alternative, is delicate and must be used carefully (for example, an extra character of whitespace in the input file results in a segmentation fault with no error message in version 6.0.1). Additionally, because HashRF provides only the core RF-distance computation, other tools are required for a biologist to be able to derive any conclusions from the output. As a final note on performance, PhyBin was straightforward to parallelize (using our \u201cLVar\u201d parallelism library) and achieves a 2.54X parallel speedup at four cores, and peaks at a 3.11X speedup at eight cores, making it a bit faster than HashRF on our target platform (Table 1). Future work will focus on reducing contention on shared data structures to improve scaling. trees phybin hashr : Branch length threshold Number of bins Number of singletons Size of largest bin RF-distance threshold Branch Length cutoff Number of clusters Number of singletons Size of largest cluster 0 n/a 222 149 16 1 n/a 140 67 34 2 n/a 77 29 56 0 0.01 175 129 133 0 0.02 95 68 201 1 0.02 66 35 246 2011)) are italicized. Topology group Orthologs (using wMel designations) Support for splitting group A Major facilitator family transporter (WD0470) Diaminopimelate epimerase (WD1208) GTP cyclohydrolase (WD0003) Metalopeptidase (WD0059) Periplasmic divalent cation tolerance (WD0828) RodA (WD1108) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t Figure 1 Wolbachia supergroup trees produced by concatenation of a dataset of 508 orthologs or by PhyBin's binning and clustering algorithm. PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t Figure 2 Comparison of PhyBin's tree of trees output using RF distance of 0 and 3 PeerJ reviewing PDF | (v2013:07:679:0:1:NEW 30 Jul 2013) R ev ie w in g M an us cr ip t", "url": "https://peerj.com/articles/188/reviews/", "review_1": "Gavin Stewart \u00b7 Oct 8, 2013 \u00b7 Academic Editor\nACCEPT\nYour response to the reviewers questions have addressed substantive concerns and improved the manuscript. Thank you for engaging positively with the peer review process.", "review_2": "Gavin Stewart \u00b7 Sep 5, 2013 \u00b7 Academic Editor\nMINOR REVISIONS\nPlease respond to the reviewers comments by amending the manuscript. Respond positively where you are able and include discussion of the issue where you disagree with views expressed by the reviewers. I draw particular attention to the issue of scale identified by reviewer two and exchangeability (fungability?) by reviewer three. Please ensure that there is appropriate discussion of the potential impacts of both on your conclusions.", "review_3": "Nicola Randall \u00b7 Aug 20, 2013\nBasic reporting\nNo comment\nExperimental design\nPlease could the authors clarify the following?\n\nHow is the optimal yield for each crop/land area calculated & what assumptions are made/what factors are taken into account?\n\nWhat countries/regions are included in Figure 1? Is it all regions (including western Europe, Canada, US etc. as Figures 3&4 appear to show, or only the 'food insecure' regions specified in Figure 2?\n\nAlso, the data set used for 'current' land use appears to be 13 years old. Are the authors aware of how land-use/farming systems may have changed in any regions during that period & of any impacts said changes may have on their results/conclusions?\nValidity of the findings\nThis is an interesting concept, the implications of which are perhaps oversimplified in the conclusions.\n\nAlthough the authors recognise that there may be limitations to optimisation, I am concerned that as it stands at the moment some of the most important practical limitations (and potential impacts) are not acknowledged, and need to be discussed.\nThese include limitations caused by water scarcity (and any potential impacts of the proposed model on water security), any requirement for rotations to manage productivity, trade limitations/impacts, environmental impacts & any impact on nutritional deficiencies.\n\nI am unsure whether the statement in the final sentence is directly relevant to the findings and would be more comfortable with conclusions that encouraged elements of the optimisation approach to be adopted where feasible.\nCite this review as\nRandall NP (2013) Peer Review #1 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/1", "review_4": "Stuart Pimm \u00b7 Jul 27, 2013\nBasic reporting\nI must stress that I am not an expert on agricultural ecosystems or crop yields and what constrains them. That said, I'm interested in global environmental issues and understand both estimates of production and diversity that form the core of this paper. I accepted the chance to review this manuscript because I have followed the senior author's work closely and admire his creative approaches to many problems.\n\nThis manuscript addresses a disarmingly simple question: can we grow more crops if we adjusted the mix to maximise productivity. The answers answer an emphatic \"yes\" for cereals while improvements for oilseeds are much smaller. All that said, the most interesting aspects are why countries have not optimised productivity. The authors suggest a variety of possibilities. At the risk of asking them to expand a paper that is short and to the point, it seems that a more complete examination of what limits optimal production is warranted.\n\n1. I consider the issue of spatial scale in the next section.\n\n2. Would an optimal production lead to greater profits for the farmers? And to what extent are allocations driven by national subsidies?\n\n3. Crop diversity is important. I found figures 3 and 4 to be most informative. Clearly most production is either close to optimal diversity or exceeds it considerably. The USA and China, for example, would need to move towards much less diverse croplands if they were to improve cereal production. Spain would need to become a cereal crop monoculture, for example.\n\n4. Large food producers are unlikely to wish to modify current allocations to feed other countries. I would like to see the improvements of production ranked by the net balance of food exports and imports. Could food importers avoid such dependency? And at what cost in terms of crop specialization?\nExperimental design\n1. My first worry is about scale. 10 x 10km is fine scale, certainly, but I'd like to be reassured that the following possibility is excluded. For such a pixel, quite possibly irrigated rice may attain the highest productivity within a small piece of that. Extrapolating such productivity across the pixel may be impossible. Just think of what happens along the Nile, for example, where one can stand with one foot in very productive crops and the other in desert. Yes, irrigated rice is more productive than rainfed wheat, but that doesn't mean one can grow rice everywhere within the pixel.\n\n2. The largest changes proposed would be to replace maize with wheat in Central Africa \u2014 for a huge increase in production \u2014 and to reduce wheat in China, but grow more rice. The authors mention these changes (page 5), but do not further investigate why the changes haven't been made. Water may well prevent rice from replacing wheat in China, and soil nutrients (and water) may well prevent wheat from replacing maize in Africa, especially one considers the scale issues I have already mentioned.\n\nThe way to investigate these possibilities is to examine a sample of pixels that seem particularly suboptimal \u2014where, for example, rice production is high per unit area within the pixel, but only a small fraction of the pixel grows rice. If that's an irrigation issue, then the authors need to assess how large an error this causes.\nValidity of the findings\nSee concerns expressed above.\nAdditional comments\nI view this as being most interesting as a way of documenting what the limitations are to increased production. The bottom line \u2014 substantial improvements \u2014 are subject to many caveats. The value of this manuscript is to list what some of them are.\nCite this review as\nPimm SL (2013) Peer Review #2 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/2", "pdf_1": "https://peerj.com/articles/188v0.2/submission", "pdf_2": "https://peerj.com/articles/188v0.1/submission", "review_5": "William Laurance \u00b7 Jul 25, 2013\nBasic reporting\nThe article is clearly written, interesting, and well prepared. The figures support the reported conclusions.\n\nA few points of clarification are needed:\n\n1) Introduction, line 1: According to the UN Population Division, the human population exceeded 7 billion in October 2012 (on Halloween, notably, although this is obviously just an approximation).\n\n2) Introduction, on the assumption of the fungibility of crops: Obviously, this is quite a large assumption in the context of the present analysis. One could imagine lots of reasons for farmers electing to have multiple crops, ranging from balancing their dietary requirements to bet-hedging against crop-specific pathogens, weather, and crop-price fluctuations. Some brief discussion of this later in the paper would be warranted.\n\n3) Results section: One point on which I was not clear was crop transport. Some crops might be produced near to where their demand is concentrated, even if that locale is suboptimal. Is this factored into the analysis? I presume not. Again, this might be mentioned briefly in the Discussion.\nExperimental design\nThe design of the analysis is effective and well considered, and falls within the scope of the journal. The paper contains a great deal of interesting analysis and interpretation.\nValidity of the findings\nMy sense is that the analyses are reasonably robust and effectively interpreted, using the best available information and data sets at hand. The conclusions seem broadly justified by the analyses, notwithstanding the need for some minor points of clarification as indicated above.\nAdditional comments\nI found much of interest in this paper. It is appropriately framed as a sort of thought experiment, and addresses some very big and important questions.\nCite this review as\nLaurance W (2013) Peer Review #3 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/3", "all_reviews": "Review 1: Gavin Stewart \u00b7 Oct 8, 2013 \u00b7 Academic Editor\nACCEPT\nYour response to the reviewers questions have addressed substantive concerns and improved the manuscript. Thank you for engaging positively with the peer review process.\nReview 2: Gavin Stewart \u00b7 Sep 5, 2013 \u00b7 Academic Editor\nMINOR REVISIONS\nPlease respond to the reviewers comments by amending the manuscript. Respond positively where you are able and include discussion of the issue where you disagree with views expressed by the reviewers. I draw particular attention to the issue of scale identified by reviewer two and exchangeability (fungability?) by reviewer three. Please ensure that there is appropriate discussion of the potential impacts of both on your conclusions.\nReview 3: Nicola Randall \u00b7 Aug 20, 2013\nBasic reporting\nNo comment\nExperimental design\nPlease could the authors clarify the following?\n\nHow is the optimal yield for each crop/land area calculated & what assumptions are made/what factors are taken into account?\n\nWhat countries/regions are included in Figure 1? Is it all regions (including western Europe, Canada, US etc. as Figures 3&4 appear to show, or only the 'food insecure' regions specified in Figure 2?\n\nAlso, the data set used for 'current' land use appears to be 13 years old. Are the authors aware of how land-use/farming systems may have changed in any regions during that period & of any impacts said changes may have on their results/conclusions?\nValidity of the findings\nThis is an interesting concept, the implications of which are perhaps oversimplified in the conclusions.\n\nAlthough the authors recognise that there may be limitations to optimisation, I am concerned that as it stands at the moment some of the most important practical limitations (and potential impacts) are not acknowledged, and need to be discussed.\nThese include limitations caused by water scarcity (and any potential impacts of the proposed model on water security), any requirement for rotations to manage productivity, trade limitations/impacts, environmental impacts & any impact on nutritional deficiencies.\n\nI am unsure whether the statement in the final sentence is directly relevant to the findings and would be more comfortable with conclusions that encouraged elements of the optimisation approach to be adopted where feasible.\nCite this review as\nRandall NP (2013) Peer Review #1 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/1\nReview 4: Stuart Pimm \u00b7 Jul 27, 2013\nBasic reporting\nI must stress that I am not an expert on agricultural ecosystems or crop yields and what constrains them. That said, I'm interested in global environmental issues and understand both estimates of production and diversity that form the core of this paper. I accepted the chance to review this manuscript because I have followed the senior author's work closely and admire his creative approaches to many problems.\n\nThis manuscript addresses a disarmingly simple question: can we grow more crops if we adjusted the mix to maximise productivity. The answers answer an emphatic \"yes\" for cereals while improvements for oilseeds are much smaller. All that said, the most interesting aspects are why countries have not optimised productivity. The authors suggest a variety of possibilities. At the risk of asking them to expand a paper that is short and to the point, it seems that a more complete examination of what limits optimal production is warranted.\n\n1. I consider the issue of spatial scale in the next section.\n\n2. Would an optimal production lead to greater profits for the farmers? And to what extent are allocations driven by national subsidies?\n\n3. Crop diversity is important. I found figures 3 and 4 to be most informative. Clearly most production is either close to optimal diversity or exceeds it considerably. The USA and China, for example, would need to move towards much less diverse croplands if they were to improve cereal production. Spain would need to become a cereal crop monoculture, for example.\n\n4. Large food producers are unlikely to wish to modify current allocations to feed other countries. I would like to see the improvements of production ranked by the net balance of food exports and imports. Could food importers avoid such dependency? And at what cost in terms of crop specialization?\nExperimental design\n1. My first worry is about scale. 10 x 10km is fine scale, certainly, but I'd like to be reassured that the following possibility is excluded. For such a pixel, quite possibly irrigated rice may attain the highest productivity within a small piece of that. Extrapolating such productivity across the pixel may be impossible. Just think of what happens along the Nile, for example, where one can stand with one foot in very productive crops and the other in desert. Yes, irrigated rice is more productive than rainfed wheat, but that doesn't mean one can grow rice everywhere within the pixel.\n\n2. The largest changes proposed would be to replace maize with wheat in Central Africa \u2014 for a huge increase in production \u2014 and to reduce wheat in China, but grow more rice. The authors mention these changes (page 5), but do not further investigate why the changes haven't been made. Water may well prevent rice from replacing wheat in China, and soil nutrients (and water) may well prevent wheat from replacing maize in Africa, especially one considers the scale issues I have already mentioned.\n\nThe way to investigate these possibilities is to examine a sample of pixels that seem particularly suboptimal \u2014where, for example, rice production is high per unit area within the pixel, but only a small fraction of the pixel grows rice. If that's an irrigation issue, then the authors need to assess how large an error this causes.\nValidity of the findings\nSee concerns expressed above.\nAdditional comments\nI view this as being most interesting as a way of documenting what the limitations are to increased production. The bottom line \u2014 substantial improvements \u2014 are subject to many caveats. The value of this manuscript is to list what some of them are.\nCite this review as\nPimm SL (2013) Peer Review #2 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/2\nReview 5: William Laurance \u00b7 Jul 25, 2013\nBasic reporting\nThe article is clearly written, interesting, and well prepared. The figures support the reported conclusions.\n\nA few points of clarification are needed:\n\n1) Introduction, line 1: According to the UN Population Division, the human population exceeded 7 billion in October 2012 (on Halloween, notably, although this is obviously just an approximation).\n\n2) Introduction, on the assumption of the fungibility of crops: Obviously, this is quite a large assumption in the context of the present analysis. One could imagine lots of reasons for farmers electing to have multiple crops, ranging from balancing their dietary requirements to bet-hedging against crop-specific pathogens, weather, and crop-price fluctuations. Some brief discussion of this later in the paper would be warranted.\n\n3) Results section: One point on which I was not clear was crop transport. Some crops might be produced near to where their demand is concentrated, even if that locale is suboptimal. Is this factored into the analysis? I presume not. Again, this might be mentioned briefly in the Discussion.\nExperimental design\nThe design of the analysis is effective and well considered, and falls within the scope of the journal. The paper contains a great deal of interesting analysis and interpretation.\nValidity of the findings\nMy sense is that the analyses are reasonably robust and effectively interpreted, using the best available information and data sets at hand. The conclusions seem broadly justified by the analyses, notwithstanding the need for some minor points of clarification as indicated above.\nAdditional comments\nI found much of interest in this paper. It is appropriately framed as a sort of thought experiment, and addresses some very big and important questions.\nCite this review as\nLaurance W (2013) Peer Review #3 of \"Transformative optimisation of agricultural land use to meet future food demands (v0.1)\". PeerJ https://doi.org/10.7287/peerj.188v0.1/reviews/3\nReview 6: \n", "LLM_extracted_review": "[\"Review 1: Your response to the reviewers questions have addressed substantive concerns and improved the manuscript. Thank you for engaging positively with the peer review process.\\n\\nReview 2: Please respond to the reviewers comments by amending the manuscript. Respond positively where you are able and include discussion of the issue where you disagree with views expressed by the reviewers. I draw particular attention to the issue of scale identified by reviewer two and exchangeability (fungibility?) by reviewer three. Please ensure that there is appropriate discussion of the potential impacts of both on your conclusions.\\n\\nReview 3: Please could the authors clarify how the optimal yield for each crop/land area is calculated and what assumptions are made/what factors are taken into account? What countries/regions are included in Figure 1? Is it all regions or only the 'food insecure' regions specified in Figure 2? The data set used for 'current' land use appears to be 13 years old. Are the authors aware of how land-use/farming systems may have changed in any regions during that period? Some of the most important practical limitations (and potential impacts) are not acknowledged, including limitations caused by water scarcity, any requirement for rotations to manage productivity, trade limitations/impacts, environmental impacts, and any impact on nutritional deficiencies. I would be more comfortable with conclusions that encouraged elements of the optimisation approach to be adopted where feasible.\\n\\nReview 4: I would like to see a more complete examination of what limits optimal production. Would an optimal production lead to greater profits for the farmers? And to what extent are allocations driven by national subsidies? The largest changes proposed would be to replace maize with wheat in Central Africa and to reduce wheat in China, but grow more rice. The authors need to assess how large an error this causes regarding irrigation issues.\\n\\nReview 5: A few points of clarification are needed regarding the assumption of the fungibility of crops and crop transport. Some crops might be produced near to where their demand is concentrated, even if that locale is suboptimal. Is this factored into the analysis?\"]" }