knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

R-CMD-check Codecov test coverage CRAN_Status_Badge DOI

Overview

mdftracks reads and writes MTrackJ Data Files (.mdf). Supports clusters, 2D data, and channel information. If desired, generates unique track identifiers based on cluster and id data from the .mdf file.

Installation

install.packages('mdftracks')

Development version

To get a bug fix or to use a feature from the development version, you can install the development version from GitHub.

# install.packages("remotes")
remotes::install_github("burgerga/mdftracks")

Usage

First load the package with

library(mdftracks)

Reading 3D data

mdf.file <- system.file("extdata", "example.mdf", package = 'mdftracks')
data <- read.mdf(mdf.file)
head(data, 10)

Dropping the z-coordinate for 2D data

data <- read.mdf(mdf.file, drop.Z = T)
head(data, 10)

Writing data in (id, t, x, y, z) format (e.g., from celltrackR)

library('celltrackR')
tracks.df <- as.data.frame(TCells)
head(tracks.df, 10)
write.mdf(head(tracks.df, 10), pos.columns = c(3,4))

Writing data with cluster, channel, and point information

print(mdftracks.example.data)
write.mdf(mdftracks.example.data, cluster.column = 'cl', id.column = 'id',  
          pos.columns = letters[24:26], channel.column = 'ch', 
          point.column = "p")

For more information, please consult the package documentation.



burgerga/mdftracks documentation built on Feb. 2, 2024, 2:09 a.m.