Phylogeny - veeninglab/BactMAP GitHub Wiki
When the cell ancestry is tracked by Oufti or SuperSegger, BactMAP creates a set of data types describing this. Since the way of describing ancestry (through “nodes”, “clades” and “edges”) comes from phylogenetic trees, this set is called the phylogeny-set. It includes:
Phylo
is a phylo object (see the ape
package for more information) containing the information on which cell
relates to which, and how long the lifetime of each cell is. An example
package given in bactMAP is ssbB_phylos
:
summary(bactMAP::ssbB_phylos)
## Length Class Mode
## edge 394 -none- numeric
## tip.label 103 -none- character
## Nnode 1 -none- numeric
## root.label 1 -none- character
## node.label 95 -none- character
## edge.length 197 -none- numeric
## root.edge 1 -none- numeric
Network
contains the same information as phylo
, but it is organized
as an igraph
, making it compatible
with network plotting packages as
ggraph
.
An example of a network dataset is given inside bactMAP and is named
ssbB_network
:
library(igraph)
##
## Attaching package: 'igraph'
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union
plot(bactMAP::ssbB_network)
Phylo
and Network
are accompanied by data_attributes
, a dataframe
containing the data included in the analysis (this can be cell
fluorescence, size or spot localization) combined with the cell’s
genealogy identifiers (node
, parent
, nodelabel
, edgelength
).
This makes it possible to plot the data attributes on top of genealogy
trees using
ggtree
.
An example dataset retrieved using SuperSegger is saved inside bactMAP:
summary(bactMAP::ssbB_meanfluo)
## node cell birth death
## Min. : 1.00 Min. : 1.0 Min. : 1.00 Min. : 1.0
## 1st Qu.: 50.00 1st Qu.: 50.0 1st Qu.:17.00 1st Qu.:26.0
## Median : 99.00 Median : 99.0 Median :25.00 Median :39.0
## Mean : 99.48 Mean :100.5 Mean :24.57 Mean :32.5
## 3rd Qu.:149.00 3rd Qu.:150.0 3rd Qu.:36.00 3rd Qu.:40.0
## Max. :198.00 Max. :207.0 Max. :40.00 Max. :40.0
##
## edgelength fluorsum fluormean fluorsum_D
## Min. : 0.000 Min. : 47218 Min. : 457.5 Min. : 95546
## 1st Qu.: 3.000 1st Qu.: 65794 1st Qu.: 466.2 1st Qu.: 152536
## Median : 8.000 Median : 81324 Median : 470.8 Median : 340060
## Mean : 7.924 Mean :151942 Mean : 764.9 Mean : 354852
## 3rd Qu.:12.000 3rd Qu.:254545 3rd Qu.:1133.5 3rd Qu.: 460037
## Max. :31.000 Max. :492453 Max. :1886.3 Max. :1465046
##
## fluormean_D parent child1 child2
## Min. : 459.3 Min. :104.0 Min. : 10.0 Min. : 11.0
## 1st Qu.: 471.3 1st Qu.:125.0 1st Qu.: 56.5 1st Qu.: 57.5
## Median :1114.5 Median :149.0 Median :103.0 Median :104.0
## Mean :1045.4 Mean :149.3 Mean :104.6 Mean :105.6
## 3rd Qu.:1379.1 3rd Qu.:174.0 3rd Qu.:151.5 3rd Qu.:152.5
## Max. :2075.6 Max. :198.0 Max. :206.0 Max. :207.0
## NA's :103 NA's :103
## root nodelabel
## Min. :0 Min. : 0.00
## 1st Qu.:0 1st Qu.: 21.00
## Median :0 Median : 48.00
## Mean :0 Mean : 50.74
## 3rd Qu.:0 3rd Qu.: 78.00
## Max. :0 Max. :127.00
##