A Visual Guide to Git Internals — Objects, Branches, and How to Create a Repo From Scratch

Comparing Trees¶

Two tree topologies can be compared using ETE and the Robinson-Foulds
(RF) metric. The method available for
any ETE tree node allows to:

‘(((a,b),c), ((e, f), g));’
‘(((a,c),b), ((e, f), g));’

«RF distance is over a total of
«Partitions in tree2 that were not found in tree1:»
«Partitions in tree1 that were not found in tree2:»

# We can also compare trees sharing only part of their labels

‘(((a,b),c), ((e, f), g));’
‘(((a,c),b), (g, H));’

«Same distance holds even for partially overlapping trees»
«RF distance is over a total of
«Partitions in tree2 that were not found in tree1:»
«Partitions in tree1 that were not found in tree2:»

Basic tree attributes¶

Each tree node has two basic attributes used to establish its position
in the tree: and . The first is
a pointer to parent’s node, while the later is a list of children
nodes. Although it is possible to modify the structure of a tree by
changing these attributes, it is strongly recommend not to do
it. Several methods are provided to manipulate each node’s connections
in a safe way (see ).

In addition, three other basic attributes are always present in any
tree node instance:

In addition, several methods are provided to perform basic operations
on tree node instances:

This is an example on how to access such attributes:

# We create a random tree topology

# You can also iterate over tree leaves using a simple syntax

Root node on unrooted trees?¶

When a tree is loaded from external sources, a pointer to the top-most
node is returned. This is called the tree root, and it will exist
even if the tree is conceptually considered as unrooted. This is,
the root node can be considered as the master node, since it
represents the whole tree structure. Unrooted trees can be identified
as trees in which master root node has more than two children.

# /-A

# -D

# /-A

# -D

Get a Planter Ready

The first thing that you should do is get a planter ready for the branch. You can fill the planter with a good potting mix that will help the branch to get started.

Most of the potting mixes that you find don’t contain any actual soil. They’re just well-draining potting mixes that are great for situations such as this.

Water the potting mix in the planter thoroughly and ensure that it’s moist all the way through the mix. You want to make a hole for your branch in the potting mix as well.

It’s said that making the hole around one inch in diameter is the best option. Ensure that the hole goes through the top of the potting mix.

Pick a Branch to Use

You want to find a good branch to use that will be viable for growing a tree. Try to find a branch that is roughly ten inches in length.

It would also be best if the branch that you choose has some leaves on it still. You can cut this branch directly from the tree whenever you’re ready.

To get the best results, you’re supposed to take cuttings for hardwood trees in the winter and softwood trees in the spring. When making the cut, it’s wise to do so at a 45-degree angle.

Modifying Tree Topology¶

If no arguments are passed to the class constructor,
an empty tree node will be returned. Such an orphan node can be used
to populate a tree from scratch. For this, the ,
and attributes should never be used (unless
it is strictly necessary). Instead, several methods exist to
manipulate the topology of a tree:

# Creates an empty tree
# Adds a new child to the current tree root
# and returns it
# Adds a second child to the current tree
# root and returns it
# Adds a new child to one of the branches
# Adds a second child to same branch as
# before, but using a sister as the starting

# Adds a third child to the
# branch. Multifurcations are supported
# Next, I add 6 random leaves to the R branch names_library is an
# optional argument. If no names are provided, they will be generated

# Prints the tree topology

# /-C

# -B
# a common use of the populate method is to quickly create example
# trees from scratch. Here we create a random tree with 100 leaves.

Deleting (eliminating) and Removing (detaching) nodes¶

# Loads a tree. Note that we use format 1 to read internal node names

«original tree looks like this:»
# This is an alternative way of using «print t». Thus we have a bit
# more of control on how tree is printed. Here i print the tree
# showing internal node names

# /-H

# -S
# Get pointers to specific nodes

# If we remove J from the tree, the whole partition under J node will
# be detached from the tree and it will be considered an independent
# tree. We can do the same thing using two approaches: J.detach() or

# = C.remove_child(J)
# if we know print the original tree, we will see how J partition is
# no longer there.
«Tree after REMOVING the node J»

# /-H

# -S
# however, if we DELETE the node G, only G will be eliminated from the
# tree, and all its descendants will then hang from the next upper

«Tree after DELETING the node G»

# /-H

# -S

Checking the monophyly of attributes within a tree¶

Although monophyly is actually a phylogenetic concept used to refer to
a set of species that group exclusively together within a tree
partition, the idea can be easily exported to any type of trees.

Therefore, we could consider that a set of values for a given node
attribute present in our tree is monophyletic, if such values group
exclusively together as a single tree partition. If not, the
corresponding relationship connecting such values (para or
poly-phyletic) could be also be inferred.

The method will do so when a given
tree is queried for any custom attribute.

«((((((a, e), i), o),h), u), ((f, g), j));»

# /-a

# -j

# We can check how, indeed, all vowels are not monophyletic in the
# previous tree, but polyphyletic (a foreign label breaks its monophyly)

# A special case of polyphyly, called paraphyly, is also used to
# define certain type of grouping. See this wikipedia article for
# disambiguation: http://en.wikipedia.org/wiki/Paraphyly

Finally, the method is also
provided, which allows to return a list of nodes within a tree where a
given set of attribute values are monophyletic. Note that, although a
set of values are not monophyletic regarding the whole tree, several
independent monophyletic partitions could be found within the same
topology.

«((((((4, e), i), o),h), u), ((3, 4), (i, june)));»
# we annotate the tree using external data

# /-4, green

# -june, yellow

# And obtain clusters exclusively green and yellow

# Green-yellow clusters:

# /-green, 4

# -yellow, i

# /-yellow, 3

# -yellow, june

When the target attribute is set to the “species” feature name,
associated to any node, this method will
accomplish with the standard phylogenetic definition of monophyly,
polyphyly and paraphyly.

Pruning trees¶

Pruning a tree means to obtain the topology that connects a certain
group of items by removing the unnecessary edges. To facilitate this
task, ETE implements the method, which can be
used by providing the list of terminal and/or internal nodes that must
be kept in the tree.

From version 2.2, this function includes also the
preserve_branch_length flag, which allows to remove nodes from a
tree while keeping original distances among remaining nodes.

# Let’s create simple tree

«Original tree looks like this:»

# /-H

# -S
# Prune the tree in order to keep only some leaf nodes.

Дополнительно:  Требует root права на андроид

# /-F

# -P
# Let’s re-create the same tree again

Browsing trees (traversing)¶

One of the most basic operations for tree analysis is tree
browsing. This is, essentially, visiting nodes within a tree. ETE
provides a number of methods to search for specific nodes or to
navigate over the hierarchical structure of a tree.

Getting Leaves, Descendants and Node’s Relatives¶

TreeNode instances contain several functions to access their
descendants. Available methods are self explanatory:

Traversing (browsing) trees¶

Every node in a tree includes a method, which can be
used to visit, one by one, every node node under the current
partition. In addition, the method can be set
to use either a post- or a preorder strategy. The only different
between and is that the
first will include the root node in the iteration.

# we load a tree

# Do some analysis on node

# If we want to iterate over a tree excluding the root node, we can
# use the iter_descendant method

# Do some analysis on node

# Browse the tree from a specific leaf to the root

Advanced traversing (stopping criteria)¶

From version 2.2, ETE supports the use of the
argument in most of its traversing functions. The value of
is expected to be a pointer to any python function
that accepts a node instance as its first argument and returns a
boolean value (True if node should be considered a leaf node).

By doing so, all traversing methods will use such a custom function to
decide if a node is a leaf. This becomes specially useful when dynamic
collapsing of nodes is needed, thus avoiding to prune the same tree in
many different ways.

«((((a,a,a)a,a)aa, (b,b)b)ab, (c, (d,d)d)cd);»

# We create a cache with every node content

# /-a

# -d

# We can even load the collapsed version as a new tree

# /-aa

# -d

Another interesting use of this approach is to find the first matching
nodes in a given tree that match a custom set of criteria, without
browsing the whole tree structure.

Let’s say we want get all deepest nodes in a tree whose branch length
is larger than one:

«(((a,b)ab:2, (c, d)cd:2)abcd:2, ((e, f):2, g)efg:2);»

# /-a

# -d

# /-e

# -g

Iterating instead of Getting¶

As commented previously, methods starting with get_ are all
prepared to return results as a closed list of items. This means, for
instance, that if you want to process all tree leaves and you ask for
them using the method, the whole tree
structure will be browsed before returning the final list of terminal
nodes. This is not a problem in most of the cases, but in large
trees, you can speed up the browsing process by using iterators.

Most get_ methods have their homologous iterator functions. Thus,
could be substituted by . The same
occurs with and .

When iterators are used (note that is only applicable for looping),
only one step is processed at a time. For instance,
will return one match in each
iteration. In practice, this makes no differences in the final result,
but it may increase the performance of loop functions (i.e. in case of
finding a match which interrupts the loop).

Finding nodes by their attributes¶

Both terminal and internal nodes can be located by searching along the
tree structure. Several methods are available:

Search_all nodes matching a given criteria¶

A custom list of nodes matching a given name can be easily obtain
through the function.

‘((H:1,I:1):0.5, A:1, (B:1,(C:1,D:1):0.5):0.5);’

# /-H

# -D

# I get D

# I get all nodes with distance=0.5

«nodes have distance=0.5»

# We can limit the search to leaves and node names (faster method).

Search nodes matching a given criteria (iteration)¶

A limitation of the method is that you cannot use
complex conditional statements to find specific nodes. When search
criteria is too complex, you may need to create your own search
function.

«Finds nodes with a given number of leaves»

# returns nodes containing 6 leaves

Find the first common ancestor¶

Searching for the first common ancestor of a given set of nodes it is
a handy way of finding internal nodes.

«((H:0.3,I:0.1):0.5, A:1, (B:0.4,(C:0.5,(J:1.3, (F:1.2, D:0.1):0.5):0.5):0.5):0.5);»

Custom searching functions¶

Finally, ETE implements a built-in method to find the first node
matching a given name, which is one of the most common tasks needed
for tree analysis. This can be done through the operator &
(AND). Thus, TreeNode&”A” will always return the first node whose name
is “A” and that is under the tree “MyTree”. The syntaxis may seem
confusing, but it can be very useful in some situations.

«((H:0.3,I:0.1):0.5, A:1, (B:0.4,(C:1,(J:1, (F:1, D:1):0.5):0.5):0.5):0.5);»
# Get the node D in a very simple way

# Get the path from B to the root

# I substract D node from the total number of visited nodes
«nodes between D and the root»
# Using parentheses you can use by-operand search syntax as a node
# instance itself

# I check if nodes belong to certain partitions
«that C’s parent is under B’s ancestor»
«that C’s parent is under J’s ancestor»

Get Your Branch Ready

Now it’s time to get your branch ready to be planted. Take the time to remove the leaves and needles that are present toward the bottom three inches of the branch that you cut.

If you’re trying to root a hardwood branch, then you’ll need to “wound” the bottom of the branch. Essentially, you’re supposed to make little vertical cuts on the bottom two inches of a hardwood branch on each side.

The purpose of doing this is to allow the branch to absorb more water than it otherwise would. This can also improve cell division and it makes this a step that you won’t want to neglect.

Caching tree content for faster lookup operations¶

If your program needs to access to the content of different nodes very
frequently, traversing the tree to get the leaves of each node over
and over will produce significant slowdowns in your algorithm. From
version 2.2 ETE provides a convenient methods to cache frequent data.

The method returns a dictionary in
which keys are node instances and values represent the content of such
nodes. By default, content is understood as a list of leave nodes, so
looking up size or tip names under a given node will be
instant. However, specific attributes can be cached by setting a
custom value.

# lets now print the size of each node without the need of
# recursively traverse

Tree Rooting¶

Tree rooting is understood as the technique by with a given tree is
conceptually polarized from more basal to more terminal nodes. In
phylogenetics, for instance, this a crucial step prior to the
interpretation of trees, since it will determine the evolutionary
relationships among the species involved. The concept of rooted trees
is different than just having a root node, which is always necessary
to handle a tree data structure. Usually, the way in which a tree is
differentiated between rooted and unrooted, is by counting the number
of branches of the current root node. Thus, if the root node has more
than two child branches, the tree is considered unrooted. By contrast,
when only two main branches exist under the root node, the tree is
considered rooted.

Having an unrooted tree means that any internal branch within the tree
could be regarded as the root node, and there is no conceptual reason
to place the root node where it is placed at the moment. Therefore, in
an unrooted tree, there is no information about which internal nodes
are more basal than others. By setting the root node between a given
edge/branch of the tree structure the tree is polarized, meaning that
the two branches under the root node are the most basal nodes. In
practice, this is usually done by setting an outgroup node,
which would represent one of these main root branches. The second one
will be, obviously, the brother node. When you set an outgroup on
unrooted trees, the multifurcations at the current root node are
solved.

In order to root an unrooted tree or re-root a tree structure, ETE
implements the method, which is present
in any tree node instance. Similarly, the
method can be used to perform the opposite action.

# Load an unrooted tree. Note that three branches hang from the root
# node. This usually means that no information is available about
# which of nodes is more basal.

Дополнительно:  Как понять что слетел биос

# /-A

# -D

# Let’s define that the ancestor of E and D as the tree outgroup. Of

«Tree rooteda at E and D’s ancestor is more basal that the others.»

# /-B

# -D

# Note that setting a different outgroup, a different interpretation
# of the tree is possible

«Tree rooted at a terminal node»

# /-H

# -A

Note that although rooting is usually regarded as a whole-tree
operation, ETE allows to root subparts of the tree without affecting
to its parent tree structure.

# /-A

# -D

# Each main branch of the tree is independently rooted.

«Tree after rooting each node independently:»

# /-F

# -E

Understanding ETE Trees¶

Any tree topology can be represented as a succession of nodes
connected in a hierarchical way. Thus, for practical reasons, ETE
makes no distinction between tree and node concepts, as any tree can
be represented by its root node. This allows to use any internal node
within a tree as another sub-tree instance.

Use Rooting Hormone

If you want to get the best results, then it’s wise to make use of a rooting hormone. You should get some rooting hormone and place it in a saucer.

About one teaspoon of the rooting hormone will do the trick. Take the time to dip the end of the branch that you’ve wounded in the rooting hormone.

You can just roll the branch at the bottom in the rooting hormone to ensure that everything is covered nicely. Once you’re done, you’ll be able to lightly shake the branch so that any extra rooting hormone comes off.

Get rid of the rooting hormone that remains on the saucer now. Place the branch in your planter with the potting mix with the wounded end facing the soil.

You might need to form the potting mix around the branch to ensure that it stays in place. Go ahead and use your hands to get the branch to stay in the planter in a proper vertical position.

Node annotation¶

Every node contains three basic attributes: name
(), branch length () and
branch support (). These three values are
encoded in the newick format. However, any extra data could be linked
to trees. This is called tree annotation.

The and
methods allow to add extra attributes (features) to any node. The
first allows to add one one feature at a time, while the second can be
used to add many features with the same call.

Once extra features are added, you can access their values at any time
during the analysis of a tree. To do so, you only need to access to
the attributes.

Similarly, can be used to delete an
attribute.

# Creates a tree
‘((H:0.3,I:0.1):0.5, A:1, (B:0.4,(C:0.5,(J:1.3, (F:1.2, D:0.1):0.5):0.5):0.5):0.5);’

# Let’s locate some nodes using the get common ancestor method

# the search_nodes method (I take only the first match )

# and using the shorcut to finding nodes by name

# Let’s now add some custom features to our nodes. add_features can be
# used to add many features at the same time.

# Or, using the oneliner notation

# But we can automatize this. (note that i will overwrite the previous

# Now we use these information to analyze the tree.
«This tree has»

# But features may refer to any kind of data, not only simple
# values. For example, we can calculate some values and store them
# within nodes.

# Let’s detect leaf nodes under «ancestor» with distance higher thatn
# 1. Note that I’m traversing a subtree which starts from «ancestor»

# And save this pre-computed information into the ancestor node

# Prints the precomputed nodes
«These are nodes under ancestor with long branches»

# We can also use the add_feature() method to dynamically add new features.

«custom label value:»

Unfortunately, newick format does not support adding extra features to
a tree. Because of this drawback, several improved formats haven been
(or are being) developed to read and write tree based
information. Some of these new formats are based in a completely new
standard (Phylogenetic XML standards), while others are extensions of the
original newick formar (NHX
http://phylosoft.org/NHX/http://phylosoft.org/NHX/).

Currently, ETE
includes support for the New Hampshire eXtended format (NHX), which
uses the original newick standard and adds the possibility of saving
additional date related to each tree node. Here is an example of a
extended newick representation in which extra information is added to
an internal node:

As you can notice, extra node features in the NHX format are enclosed
between brackets. ETE is able to read and write features using such
format, however, the encoded information is expected to be exportable
as plain text.

# Creates a normal tree
‘((H:0.3,I:0.1):0.5, A:1,(B:0.4,(C:0.5,(J:1.3,(F:1.2, D:0.1):0.5):0.5):0.5):0.5);’

# Let’s locate some nodes using the get common ancestor method

# Let’s label leaf nodes

# Let’s detect leaf nodes under «ancestor» with distance higher thatn
# 1. Note that I’m traversing a subtree which starts from «ancestor»

# And save this pre-computed information into the ancestor node

«NHX notation including vowel and confidence attributes»

«NHX notation including all node’s data»

# Note that when all features are requested, only those with values
# equal to text-strings or numbers are considered. «long_branch_nodes»
# is not included into the newick string.

«basic newick formats are still available»

# You don’t need to do anything speciall to read NHX notation. Just
# specify the newick format and the NHX tags will be automatically

# Loads the NHX example found at http://www.phylosoft.org/NHX/

# And access node’s attributes.

Unfortunately, newick format does not support adding extra features to
a tree. Because of this drawback, several improved formats haven been
(or are being) developed to read and write tree based
information. Some of these new formats are based in a completely new
standard (Phylogenetic XML standards), while others are extensions of the
original newick format (NHX
http://phylosoft.org/NHX/http://phylosoft.org/NHX/).

Solving multifurcations¶

When a tree contains a polytomy (a node with more than 2 children),
the method can be used to convert the node
into a randomly bifurcated structure in which branch lengths are set
to 0. This is really not a solution for the polytomy but it allows to
export the tree as a strictly bifurcated newick structure, which is a
requirement for some external software.

The method can be used on a very specific node while keeping the rest
of the tree intact by disabling the flag.

«(( (a, b, c), (d, e, f, g)), (f, i, h));»

# /-a

# -h

# /-b

# -h

# /-b

# -f

# Let’s create simple tree

«Original tree looks like this:»

# /-H

# -S
# Prune the tree in order to keep only some leaf nodes.

# /-F

# -P
# Let’s re-create the same tree again

Copying (duplicating) trees¶

ETE provides several strategies to clone tree structures. The method
can be used to produce a new independent tree
object with the exact topology and features as the original. However,
as trees may involve many intricate levels of branches and nested
features, 4 different methods are available to create a tree copy:

«((A, B)Internal_1:0.7, (C, D)Internal_2:0.5)root:1.3;»
# we add a custom annotation to the node named A

# we add a complex feature to the A node, consisting of a list of lists

# /Internal_1, 0.7

# -root, 1.3

# Internal_2, 0.5
# -D, 0.0

# Newick copy will loose custom node annotations, complex features,
# but not names and branch values

# /-A, 0.0
# /Internal_1, 0.7

# -NoName, 0.0

# Internal_2, 0.5
# -D, 0.0

# Extended newick copy will transfer custom annotations as text
# strings, so complex features are lost.

# /-A, 0.0, custom Value, __0_ 1__ _2_ 3__ _1_ 11__ _1_ 0__
# /Internal_1, 0.7

# -NoName, 0.0

# Internal_2, 0.5
# -D, 0.0

# The default pickle method will produce a exact clone of the
# original tree, where features are duplicated keeping their
# python data type.

«first element in complex feature:»

# /Internal_1, 0.7

# -root, 1.3

# Internal_2, 0.5
# -D, 0.0

Working with branch distances¶

The branch length between one node an its parent is encoded as the
attribute. Together with tree topology, branch
lengths define the relationships among nodes.

Getting distances between nodes¶

The method can be used to calculate the
distance between two connected nodes. There are two ways of using this
method: a) by querying the distance between two descendant nodes (two
nodes are passed as arguments) b) by querying the distance between the
current node and any other relative node (parental or descendant).

# Loads a tree with branch lenght information. Note that if no
# distance info is provided in the newick, it will be initialized with
# the default dist value = 1.0
«»»(((A:0.1, B:0.01):0.001, C:0.0001):1.0,

Дополнительно:  How to grant all privileges to root user in MySQL 8.0

# /-A

# -E

# Locate some nodes

# Calculate distance from current node
«The distance between A and C is»
# Calculate distance between two descendants of current node
«The distance between A and C is»
# Calculate the toplogical distance (number of nodes in between)
«The number of nodes between A and D is «

Additionally to this, ETE incorporates two more methods to calculate
the most distant node from a given point in a tree. You can use the
method to retrieve the most distant
point from a node within the whole tree structure. Alternatively,
will return the most distant
descendant (always a leaf). If more than one node matches the farthest
distance, the first occurrence is returned.

Distance between nodes can also be computed as the number of nodes
between them (considering all branch lengths equal to 1.0). To do so,
the topology_only argument must be set to True for all the
above mentioned methods.

# Calculate the farthest node from E within the whole structure

«The farthest node from E is»
# Calculate the farthest node from E within the whole structure,
# regarding the number of nodes in between as distance value
# Note that the result is differnt.

«The farthest (topologically) node from E is» «nodes in between»
# Calculate farthest node from an internal node

«The farthest node from root is»

# The distance between A and C is 0.1011
# The distance between A and C is 0.1011
# The number of nodes between A and D is 8.0
# The farthest node from E is A with dist= 1.1010011
# The farthest (topologically) node from E is I with 5.0 nodes in between
# The farthest node from root is A with dist= 1.101

Getting midpoint outgroup¶

In order to obtain a balanced rooting of the tree, you can set as the tree
outgroup that partition which splits the tree in two equally distant clusters
(using branch lengths). This is called the midpoint outgroup.

The method will return the
outgroup partition that splits current node into two balanced branches
in terms of node distances.

# generates a random tree

# /-qogjl

# -rkzwd
# Calculate the midpoint node

# and set it as tree outgroup

# /-opben

# -rkzwd

Reading and Writing Newick Trees¶

The Newick format is one of the most widely used standard
representation of trees in bioinformatics. It uses nested parentheses
to represent hierarchical data structures as text strings. The
original newick standard is able to encode information about the tree
topology, branch distances and node names. Nevertheless, it is not
uncommon to find slightly different formats using the newick standard.

ETE can read and write many of them:

Reading newick trees¶

In order to load a tree from a newick text string you can use the
constructor or its alias, provided by the main module
. You will only need to pass a text string containing
the newick structure and the format that should be used to parse it (0
by default). Alternatively, you can pass the path to a text file
containing the newick string.

# Loads a tree structure from a newick string. The returned variable ’t’ is the root node for the tree.

# Load a tree structure from a newick file.

# You can also specify the newick format. For instance, for named internal nodes we will use format 1.

Any ETE tree instance can be exported using newick notation using the
method, which is available in any tree node
instance. It also allows for format selection
(Reading and Writing Newick Trees), so you can use the same function to
convert between newick formats.

# Loads a tree with internal node names

# And prints its newick using the default format

# To print the internal node names you need to change the format:

# We can also write into a file

# Calculate the farthest node from E within the whole structure

«The farthest node from E is»
# Calculate the farthest node from E within the whole structure,
# regarding the number of nodes in between as distance value
# Note that the result is differnt.

«The farthest (topologically) node from E is» «nodes in between»
# Calculate farthest node from an internal node

«The farthest node from root is is»

# The distance between A and C is 0.1011
# The distance between A and C is 0.1011
# The number of nodes between A and D is 8.0
# The farthest node from E is A with dist= 1.1010011
# The farthest (topologically) node from E is I with 5.0 nodes in between
# The farthest node from root is is A with dist= 1.101

Trees are a widely-used type of data structure that emulates a tree
design with a set of linked nodes. Formally, a tree is considered an
acyclic and connected graph. Each node in a tree has zero or more
child nodes, which are below it in the tree (by convention, trees grow
down, not up as they do in nature). A node that has a child is called
the child’s parent node (or ancestor node, or superior). A node has at
most one parent.

The height of a node is the length of the longest downward path to a
leaf from that node. The height of the root is the height of the
tree. The depth of a node is the length of the path to its root (i.e.,
its root path).

In bioinformatics, trees are the result of many analyses, such as
phylogenetics or clustering. Although each case entails specific
considerations, many properties remains constant among them. In this
respect, ETE is a python toolkit that assists in the automated
manipulation, analysis and visualization of any type of hierarchical
trees. It provides general methods to handle and visualize tree
topologies, as well as specific modules to deal with phylogenetic and
clustering trees.

The Final Touches

Go ahead and grab a spray bottle filled with water so that you can lightly mist the branch and the leaves. Now you can grab four sticks and place them in the potting mix alongside the branch toward the edge of the planter.

Take the time to cover the planter using a plastic film of some sort. This helps to create a greenhouse effect that traps the humidity inside.

Find a spot for your planter that receives indirect sunlight. Ideally, you’ll want a location where the temperature is about 65 degrees Fahrenheit as well.

You can place the planter in a temperature-controlled environment to be safe. Many enthusiasts will choose to place a heat mat under the planter and they’ll set it to 70 degrees Fahrenheit.

This helps to keep the soil temperature where it needs to be for the plant. It’s a good idea to do this when you want things to turn out perfectly.

Keep checking on your branch each day to see how it’s doing. Check on your soil to see how moist it is and note how the branch seems to be developing.

You can mist the leaves every time you go to check on the branch. Try to ensure that the soil remains moist.

With this done, your tree branch should be successfully rooted. You’ll be able to tell if roots have formed by gently tugging on the branch to see if it stays in place well.

You can transplant the cutting into a planter with soil eventually. You just keep the soil moist and place it in indirect sunlight.

After the branch has been rooted for a year, you’ll be able to start getting it used to outdoor temperatures before planting it in the ground. You’ll then have a young tree growing on the property that you made from a branch cutting.

Final Thoughts

Being able to make a new tree from a simple branch cutting is neat. This is something that you don’t need a lot of skill to be able to do, but you will need to keep caring for the young tree.

Before you go: Now is the perfect time to start tracking your gardening progress, and I created a garden journal to do exactly that. Click the image below to see it in action and to get your own copy.

Concatenating trees¶

# Loads 3 independent trees

‘(H, ((I,J), (K,L)));’

# /-A

# -C

# /-D

# -G

# /-H

# -L
# Locates a terminal node in the first tree

# and adds the two other trees as children.

«Resulting concatenated tree:»
# /-D

# -C

Оцените статью
Master Hi-technology
Добавить комментарий