Generate several plots to visualise TrackMate data and generate a report. The use of um is because ggsave does not currently save unicode to PDF reliably. The code is switchable to accommodate making a "report" (one dataset) or a "summary" (several related datasets combined)
makeSummaryReport(
tmList,
msdList,
jumpList,
tddf,
fddf,
titleStr = "",
subStr = "",
auto = FALSE,
summary = FALSE,
...
)
list of trackmate data and calibration
MSD summary and alpha list = output from calculateMSD()
list of a data frame of jump data and a variable to be passed to timeRes
data frame of track density data
data frame of fractal dimension data
string used as the title for the report
string used as the subtitle for the report
boolean which selects for returning the patchwork report (FALSE) or a list of the patchwork report and a data frame of summary (TRUE)
boolean which selects for report (FALSE) or summary (TRUE)
additional arguments passed to methods
patchwork ggplot or a list of patchwork ggplot and data frame of summary data
xmlPath <- system.file("extdata", "ExampleTrackMateData.xml", package="TrackMateR")
tmObj <- readTrackMateXML(XMLpath = xmlPath)
#> Units are: 1 pixel and 0.07002736 s
#> Spatial units are in pixels - consider transforming to real units
#> Collecting spot data. Using 4 cores
#> Matching track data...
#> Calculating distances...
tmObj <- correctTrackMateData(tmObj, xyscalar = 0.04)
#> Correcting XY scale.
tmDF <- tmObj[[1]]
calibrationDF <- tmObj[[2]]
msdObj <- calculateMSD(df = tmDF, method = "ensemble", N = 3, short = 8)
jdObj <- calculateJD(dataList = tmObj, deltaT = 1)
tdDF <- calculateTrackDensity(dataList = tmObj, radius = 1.5)
fdDF <- calculateFD(dataList = tmObj)
fileName <- tools::file_path_sans_ext(basename(xmlPath))
reportObj <- makeSummaryReport(tmList = tmObj, msdList = msdObj, jumpList = jdObj,
tddf = tdDF, fddf = fdDF, titleStr = "Report", subStr = fileName, auto = TRUE)