The goal of {mamut2r} is to imports data coming from .xml files generated with the Fiji MaMuT plugin for lineage and tracking of biological objects. {mamut2r} also allows to create lineage plots.

How to cite

To cite {mamut2r}, call the R built-in command citation("mamut2r").

Marion Louveaux, & Sébastien Rochette. (2018, October 19). mamut2r: a R package to import and visualize xml files from the MaMuT Fiji plugin (Version v0.0.2). Zenodo. http://doi.org/10.5281/zenodo.1467431

Full documentation with {pkgdown}

See full documentation created with {pkgdown} at https://marionlouveaux.github.io/mamut2r/

Open Rmd files used to build vignettes

You may need to install {cellviz3d}, and you will need to install mamut2r with the vignettes.

Getting started

Loading .xml MaMuT file

The mamut.xml file is loaded as a list in R using the xmlToList() function from the {XML} package.

fileXML <- xmlToList(system.file("extdata", "MaMuT_Parhyale_demo-mamut.xml", package = "mamut2r"))

Getting information relative to either nuclei (= spots) or lineages (=tracks)

The MaMuT .xml file stores two type of objects, under two types of tags: the spots and the tracks. In the case of the study of the development of an organ, spots usually refer to nuclei and tracks to cell lineages. Here, Spots.as.dataframe() and Tracks.as.dataframe() extract information from the .xml file and format them as dataframes (more precisely as tibbles).

Information regarding the spots (x, y, z location, ID…) are extracted using the Spots.as.dataframe and stored in a tibble.

Information regarding the tracks (ID of source and target spots, track ID…) are extracted using the Tracks.as.dataframe and stored in a tibble.

Visualising the lineage trees

track2plot() allows to plot the lineage trees with a custom color code.
Tracks are identified by their ID.

To plot one track:

To plot the first six tracks:

trackset <- all_tracks[1:6]
nbrow <- 2
#display y axis only for plots on the left
colYaxis_pattern <- rep(c("black", 
                          rep("white", (ceiling(length(trackset)/nbrow)-1) ) ), nbrow) 
colYaxis <- colYaxis_pattern[1:length(trackset)]

all_layouts <- map2(trackset, colYaxis,
                    ~track2plot(.x, Tracks_df, Spots_Tracks, colNode = TRACK_ID, colYaxis = .y, colNode_discrete=TRUE, breaks = unique(trackset)))

prow <- plot_grid(plotlist = all_layouts, nrow = nbrow)
legend <- get_legend(all_layouts[[1]]+theme(legend.position="right"))
p <- plot_grid( prow, legend, rel_widths = c(1, .3))
p

Acknowledgements

Many thanks to Dr. Jean-Yves Tinevez, John Bogovic, and Dr. Tobias Pietsch for their help on MaMuT and Big Data Viewer, and to Dr. Mike Smith for his help on the getFluo() function.

Code of conduct

Please note that the ‘mamut2r’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.