extr_Morphometrics - veeninglab/BactMAP GitHub Wiki

Upload cell outlines segmented using Morphometrics

Description

The ‘CONTOURS’-output from Morphometrics is uploaded and converted to a mesh-dataframe compatible with bactMAPs plotting functions.

Usage

extr_Morphometrics(morphpath, mag, turncells = TRUE, cellList = FALSE)

Arguments

morphpath
the path to the ‘CONTOURS’- output of Morphometrics (for instance “mycells_01-01-2019_CONTOURS.mat”).

mag pixel conversion factor (see pixels2um). if added, the coordinates and cell length/width will be converted to micron

turncells
if set to TRUE (default), X and Y coordinates will be turned so that mid-cell is at [0,0], while the length axis of the cell’s bounding box is parallel to the x axis.

cellList when TRUE, the Value cellList is returned along with the other output.

Value

cellList
dataframe containing the original data extracted from Morphometrics.

mesh
dataframe containing the coordinates of the outlines of the cell, cell dimensions and if turncells==TRUE, the coordinates of each cell turned and repositioned to [0,0]

pixel2um
if mag was defined in the arguments, the conversion factor is saved in the output list.

Author(s)

Renske van Raaphorst

References

Ursell T, Lee TK, Shiomi D, et al. Rapid, precise quantification of bacterial cellular dimensions across a genomic-scale knockout library. BMC Biol. 2017;15(1):17. Published 2017 Feb 21. doi:10.1186/s12915-017-0348-8

Examples

#Upload Morphometrics output from bactMAP example files. 
#Find example dataset in the pneumococcus folder of the 
#localization dataset on veeninglab.com/bactmap

library(bactMAP)

Example_MM <-  file.choose()
Example_output <- extr_Morphometrics(Example_MM)$mesh

#check output:
summary(Example_output)

#plot cells
plotRaw(Example_output, frameN=1)

Back to the Overview of Import Functions