This solution also uses forest but it uses it via a wrapper provided by the package justtrees. This package is experimental but I'm happy to provide copies on request. (I need guinea pigs!)
The point of justtrees is to make it easy to provide horizontally aligned labels to the left and/or right of the tree. In particular, it does all the calculating and alignment for you. All you do is specify the labels you want for the levels you want them, as part of the main specification of the tree.
It provides a new environment justtree which takes one mandatory argument. (It is fine for the argument to be empty, but it must be there. The content of the environment includes the actual tree specification.
\begin{justtree}
{
<tree preamble, options - may be empty>
}
<tree specification>
\end{justtree}
Since you are planning to do lots of similar trees, it makes sense to define a forest style for the kind of squared look you want. The following sets up this style. (It isn't specific to justtrees - you could use it for a regular forest tree instead.)
\forestset{
squared just tree/.style={
for tree={
edge path={% set up the squared look
\noexpand\path [\forestoption{edge}] (!u.parent anchor) -- +(0,-5pt) -| (.child anchor)\forestoption{edge label};
},
Since you also want multi-lined nodes, we'll add an alignment to the style allowing this. center will centre each line of multi-line nodes.
align=center,
The next bit is optional. In many trees, this will look better. Basically, if the number of children is odd and greater than 2, then the middle child will be aligned with its parent. So, if there are 3 children, the 2nd one will be aligned. This ensures a straight line from the parent to the middle child.
if={(isodd(n_children))&&(n_children>2)}
{
for children={
if={equal(n,((n_children("!u"))+1)/2)}
{
calign with current
}{},
}
}{},
I'm not quite sure from the question whether you want this, but the following ensures that the last children in each branch are horizontally aligned, even if there are more levels in some branches than others.
if n children=0
{
before packing={tier=terminus}
}{},
},
}
}
The nice thing about this is that, once you've got a style you are happy with, you can just use it for all the trees you want to apply it to. In our case, it means we can specify the tree like this.
\begin{justtree}
Recall that this environment takes a mandatory argument which contains the preamble for the tree.
{%
By default, the horizontal labels (which are called 'justifications' due to the origin of the package) will appear on the right. You can override this for individual labels but, if you only want labels on the left, it makes sense to set the default to left.
left justifications,
Now we just add the style we've set up for our trees.
squared just tree,
And that's the preamble done.
}
Now for the tree specification itself. I wrote an introduction to forest's syntax and some of its options in the second part of this answer to an earlier question.
Here's the root. just=<whatever> sets the label for this level to <whatever>. The label will be automatically placed and aligned when the tree is drawn.
[$\gamma$-proteobacteria, just=Class
Here's another label for the next level.
[Alteromonadales, just=Order
[Alteromonadaceae
[Alteromonas
]
[Glaciecola
]
Here's a label for the next level. Note that it doesn't matter which node on a level you use to specify the label. just will always put it to the far left of the left of the tree.
[Agarivorans, just=Genus
]
]
]
[Vibrionales
Nor does it matter if the label is specified as part of a different branch. The label will still go to the left of the leftmost branch.
[Vibrionacae, just=Family
[Vibrio
]
]
]
Just for kicks: a multi-line node and a branch with fewer levels than the others.
[A longer text\\ split over 2 lines
[Last]
]
]
\end{justtree}
This produces the following tree:

Complete code:
\documentclass[border=5pt, multi, tikz]{standalone}
\usepackage{justtrees}% version 0.05 : available for experimental use on request (just ask!)
\forestset{
squared just tree/.style={
for tree={
edge path={
\noexpand\path [\forestoption{edge}] (!u.parent anchor) -- +(0,-5pt) -| (.child anchor)\forestoption{edge label};
},
align=center,
if={(isodd(n_children))&&(n_children>2)}
{
for children={
if={equal(n,((n_children("!u"))+1)/2)}
{
calign with current
}{},
}
}{},
if n children=0
{
before packing={tier=terminus}
}{},
},
}
}
\begin{document}
\begin{justtree}
{%
left justifications,
squared just tree,
}
[$\gamma$-proteobacteria, just=Class
[Alteromonadales, just=Order
[Alteromonadaceae
[Alteromonas
]
[Glaciecola
]
[Agarivorans, just=Genus
]
]
]
[Vibrionales
[Vibrionacae, just=Family
[Vibrio
]
]
]
[A longer text\\ split over 2 lines
[Last]
]
]
\end{justtree}
\end{document}
If you would like to try out justtrees, please let me know.
I would be happy to provide a copy of the package. There are copies around here. However, they are not the latest version, so please ask if you want to try it.
EDIT & UPDATE
Note that the just= is not required to ensure the levels are aligned. It is only required to specify the content of the label for that level of the tree. If a particular level does not need a label, no label need be specified.
In response to the OP's request for left aligned labels to the left of the tree, I've adapted the code of the package to enable this. I'd forgotten that, in simplifying the code when creating justtrees.sty from prooftrees.sty, I'd abandoned the use of branches for the labels altogether and just use the tikz+ options. This makes it simpler in some ways to vary the alignment of the text in labels, but more complex in others. (Swings and roundabouts. Roundabouts and swings.)
The main issue turned out to be the need to track the width of the node contents so that all labels can be placed in nodes of the same width. The way this now works, basically, is that the code checks for the contents of each label on the left (right) whether its width exceeds a width stored in a macro. If it does, the macro is updated to store the larger width. If not, it is left alone. This macro's stored width is then fed to the label nodes on the left (right) as text width and, in addition, the alignment is set appropriately.
These changes are effective in version 0.06 of the code.
To set the alignment for the labels on the left
left just align=<alignment>
Sensible values are right (default), left or center.
To set the alignment for the labels on the right
right just align=<alignment>
Sensible values are left (default), right or center.
So, to align the labels in the tree above left, we can just change the preamble as follows:
\begin{justtree}
{%
left justifications,
squared just tree,
left just align=left,
}

The following slightly bizarre looking example sets the left labels left and the right labels right, and includes some especially long labels just to check that it still works:
\begin{justtree}
{%
left justifications,
squared just tree,
left just align=left,
right just align=right,
}
[$\gamma$-proteobacteria, left just=Class Membership
[Alteromonadales, left just=Order
[Alteromonadaceae
[Alteromonas
]
[Glaciecola
]
[Agarivorans, right just={Genus, Kingdom \& Sovereignty}
]
]
]
[Vibrionales, right just={$E=mc^2$}
[Vibrionacae, left just=Family
[Vibrio
]
]
]
[A longer text\\ split over 2 lines
[Last]
]
]
\end{justtree}

Complete code:
\documentclass[border=5pt, multi, tikz]{standalone}
\usepackage{justtrees}% version 0.06 : available for experimental use on request (just ask!)
\forestset{
squared just tree/.style={
for tree={
edge path={
\noexpand\path [\forestoption{edge}] (!u.parent anchor) -- +(0,-5pt) -| (.child anchor)\forestoption{edge label};
},
align=center,
if={(isodd(n_children))&&(n_children>2)}
{
for children={
if={equal(n,((n_children("!u"))+1)/2)}
{
calign with current
}{},
}
}{},
if n children=0
{
before packing={tier=terminus}
}{},
},
}
}
\begin{document}
\begin{justtree}
{%
left justifications,
squared just tree,
left just align=left,
}
[$\gamma$-proteobacteria, just=Class
[Alteromonadales, just=Order
[Alteromonadaceae
[Alteromonas
]
[Glaciecola
]
[Agarivorans, just=Genus
]
]
]
[Vibrionales
[Vibrionacae, just=Family
[Vibrio
]
]
]
[A longer text\\ split over 2 lines
[Last]
]
]
\end{justtree}
\begin{justtree}
{%
left justifications,
squared just tree,
left just align=left,
right just align=right,
}
[$\gamma$-proteobacteria, left just=Class Membership
[Alteromonadales, left just=Order
[Alteromonadaceae
[Alteromonas
]
[Glaciecola
]
[Agarivorans, right just={Genus, Kingdom \& Sovereignty}
]
]
]
[Vibrionales, right just={$E=mc^2$}
[Vibrionacae, left just=Family
[Vibrio
]
]
]
[A longer text\\ split over 2 lines
[Last]
]
]
\end{justtree}
\end{document}
Note that, at present, alignment will not work if the labels are formatted in a different sized font from the nodes in the main tree. I consider this a bug and would like to fix it but couldn't see immediately how, so it is unfixed for now.
justtree, unlike aforestneed not have a single root: the real root is added automatically but invisibly to allow the branches on each side. But your solution is probably safer (+1) as it does not rely on code by me ;). – cfr Jan 14 '16 at 02:10tier=terminusin this case to ensure that all the final children are on the same level. What names the levels? – cfr Jan 14 '16 at 02:25just=<name>, I was referring to that. That's similar to my first solution (see my answers revisions, the first one I think). – Alenanno Jan 14 '16 at 02:27