|
1 | 1 |
|
2 | 2 | This tool may interest individuals with and without a background in computer science, so all users need to become familiar with the nomenclature used by LineageTree. To that end, this glossary defines the terms used throughout the project. |
3 | 3 |
|
4 | | -- ### Trees |
5 | | - |
6 | | - A tree is a hierarchical acyclic graph that contains nodes and edges, lineageTree works with at most 2 successors for one node. To create a demo tree the user can call |
| 4 | +- ### Tree Graphs |
| 5 | + A tree graph is a hierarchical acyclic graph that contains nodes and edges, **LineageTree is a tree graph** that has at most 2 successors for one node. To create a demo tree the user can call |
7 | 6 |
|
8 | 7 | ```python |
9 | 8 | from lineagetree import LineageTree |
10 | 9 | lT = LineageTree(successors= {i:[i+1] for i in range(10)}) |
11 | 10 | ``` |
12 | 11 |
|
13 | 12 |  |
14 | | -> The differences between a biological lineage and a LineageTree lineage |
| 13 | +> The differences between a biological lineage and a LineageTree. |
15 | 14 |
|
16 | 15 | - ### Nodes |
17 | | - |
18 | | - The smallest part of a tree, a point that may or may not connect to others. The set of all the nodes may be accessed by ```lT.nodes``` |
| 16 | + The **smallest part of a LineageTree**, a point that may or may not connect to others. The set of all the nodes may be accessed by ```lT.nodes``` |
19 | 17 |
|
20 | 18 | - ### Edges |
21 | | - |
22 | | - The lTect that connects 2 nodes, in the case of the tree its also directed (goes one way). The edges may be accessed throug ```lT.edges``` |
| 19 | + The object that **connects 2 nodes**, in the case of the tree its also directed (goes one way). The edges may be accessed through ```lT.edges``` |
23 | 20 |
|
24 | 21 | - ### Successors |
25 | | - |
26 | | - The successor of a node n is a node connected with an edge to the node n that exists one level (timepoint) lower than n. The immutable dictionary (MappingProxy) of all the successors may be accessed by ```lT.successor``` |
| 22 | + The successor of a **node n in timepoint t is the node n' in timepoint t+1** and is connected to the node n. The immutable dictionary (MappingProxy) of all the successors may be accessed by ```lT.successor``` |
27 | 23 |
|
28 | 24 | - ### Predecessors |
29 | | - |
30 | | - The predecessor of a node n is a node connected to the node that exists one time point higher than n. The immutable dictionary (MappingProxy) of all the predecessors may be accessed by ```lT.predecessor``` |
| 25 | + The predecessor of a **node n in timepoint t is the node n' in timepoint t-1** and is connected to the node n. The immutable dictionary (MappingProxy) of all the predecessors may be accessed by ```lT.predecessor``` |
31 | 26 |
|
32 | 27 | - ### Roots |
33 | | - |
34 | | - The root of a tree is a node that has no predecessors. In the case of lineageTree the root has an empty tuple as predecessor. LineageTree allows for many roots to exist in the same file. The set of roots may be accessed by using ```lT.roots``` |
| 28 | + The root of a tree is **a node that has no predecessors**. In the case of lineageTree the root has an empty tuple as predecessor. LineageTree allows for many roots to exist in the same file. The set of roots may be accessed by using ```lT.roots``` |
35 | 29 |
|
36 | 30 | - ### Leaves |
37 | | - |
38 | | - The leaf of a tree is a node that has no successors. In the case of lineageTree the leaf has an empty tuple as a successor. The set of leaves may be accessed through ```lT.leaves``` |
39 | | - |
40 | | -- ### Divisions |
41 | | - |
42 | | - An event where one node has 2 successors instead of one. There is no direct way to access a division; however, the node that is before a division (or after) is always at the end or start of a chain (except for the cases that the chain contains a leaf or a root) |
| 31 | + The leaf of a tree is **a node that has no successors**. In the case of lineageTree the leaf has an empty tuple as a successor. The set of leaves may be accessed through ```lT.leaves``` |
43 | 32 |
|
44 | 33 | - ### Chains |
| 34 | + A **tree segment**, where **all nodes are between a division or root and a division or a leaf**. To access a chain that contains a specific node `n`, the user may use:``` lT.get_chain_of_node(n) ``` |
| 35 | + A continuous subset of a chain may be referred to as a subchain or a path, which is not a chain. |
45 | 36 |
|
46 | | - A tree segment, where all nodes are between a division or root and a division or a leaf. To access a chain that contains a specific node `n`, the user may use:``` lT.get_chain_of_node(n) ``` |
47 | | -A continuous subset of a chain may be referred to as a subchain or a path, which is not a chain. |
| 37 | +- ### Divisions |
| 38 | + An event where **one node has 2 successors** instead of one. There is no direct way to access a division; however, the node that is before a division (or after) is always at the end or start of a chain (except for the cases that the chain contains a leaf or a root) |
48 | 39 |
|
49 | 40 | - ### Subtree |
50 | | - |
51 | | - Any segment of a tree that is also a tree. Using the function ```lT.get_sub_tree(node)``` will not provide a new lineageTree but a list of all the nodes contained inside the subtree. |
| 41 | + Any segment of a tree that is also a tree. The function ```lT.get_sub_tree(node)``` will return a list of all the nodes contained inside the subtree. |
52 | 42 |
|
53 | 43 | - ### Siblings |
54 | | - |
55 | | - Two nodes that have the same predecessor. Often used for chains where the first node of each chain has the same predecessor as the other one. |
| 44 | + **Two nodes that have the same predecessor**. Often used for chains where the first node of each chain has the same predecessor as the other one. |
56 | 45 |
|
57 | 46 | - ### Time |
58 | | - |
59 | 47 | The time point at which the nodes exist. This property concerns time points and is not real time. |
60 | 48 | The immutable dictionary (MappingProxy) containing the time information for all the nodes may be accessed through ```lT.times```. |
61 | 49 |
|
62 | 50 | - ### Time resolution |
63 | | - |
64 | 51 | How long one time point lasts, relevant only for comparisons across lineages. This attribute can be a property or inspected by ```lT.time_resolution```. |
| 52 | + |
| 53 | +#### API reference |
| 54 | + |
0 commit comments