extr_Microbe: upload MicrobeJ output into R for further analysis

extr_MicrobeJR Documentation

upload MicrobeJ output into R for further analysis

Description

Upload the output of MicrobeJ into R. Upto now the code supports fluorescent localization data & cell outlines, both saved as seperate .CSV or .TXT files in the MicrobeJ GUI by first pressing <right click> -> expand all on one of the Results columns and then pressing <right click> -> export for both the cell contour dataset and the fluorescent localization dataset.

Usage

extr_MicrobeJ(dataloc, spotloc, objectloc, mag = "No_PixelCorrection", sepspot=",", sepmesh=",", sepobj=",", cellList=FALSE, keeprealvalues=FALSE, magcor = c("dataloc", "spotloc", "objectloc"), extracols)

Arguments

dataloc

path of the exported microbeJ file (.csv or .txt) containing the outlines of the bacterial cells.

spotloc

path of the exported microbeJ file (.csv or .txt) containing the sub-directory with fluorescent spot coordinates

objectloc

path of the exported microbeJ file (.csv or .txt) containing the outlines of objects/filaments in the cell.

mag

the pixel conversion factor to be used, default = "No_PixelCorrection"

sepspot

default is ",". when the to-be-imported .csv/txt is seperated by another value, change here.

sepmesh

default is ",". when the to-be-imported .csv/txt is seperated by another value, change here.

sepobj

default is ",". when the to-be-imported .csv/txt is seperated by another value, change here.

cellList

when cellList==TRUE, the dataframe 'cellList' (see Values below) will be in the output list.

keeprealvalues

default FALSE. BactMAP checks whether the mesh and spot files are both in pixels or in micron and corrects this. When keeprealvalues==TRUE, BactMAP skips this step.

magcor

indicates the input datasets which need to be corrected (pixel to micron). if not changed, all datasets are corrected.

extracols

if there are any other main variables inside 'dataloc' you wish to pass on to your output, add them here as a vector of character strings (for instance "myvariable" for 1 variable, or c("myvariable1", "myvariable2") for 2 variables.)

Details

Input either dataloc, spotloc or both to receive a list of dataframes containing the microbeJ data.

Use getPixels2um() and addPixels2um() to check which conversion factors are loaded and to add new ones.

Value

List of items containing:

$mesh

dataframe containing MicrobeJ outlines of the cell

$spotframe

dataframe containing MicrobeJ spot x/y coordinates and cell identifying number.

$spots_relative

dataframe containing the relative x/y coordinates of the spots inside the cell

$cellList

(a list of) the original input dataframe(s)

$pixels2um

the pixel conversion factor used in the function

Author(s)

Renske van Raaphorst

References

https://microbej.com

Ducret, A., Quardokus, E.M. and Brun, Y.V., 2016. MicrobeJ, a tool for high throughput bacterial cell detection and quantitative analysis. Nature microbiology, 1, p.16077.

Examples

## Not run: 
##upload MicrobeJ datasets
dataloc <- file.choose()
spotloc <- file.choose()
##extract data
micdata <- extr_MicrobeJ(dataloc, spotloc, mag = "100x_LeicaVeening")


## End(Not run)

vrrenske/shinyspots documentation built on Oct. 28, 2023, 12:26 p.m.