clusterTraces: cluster traces in space (and/or time) using DBscan

Description Usage Arguments Author(s) Examples

View source: R/clusterTraces.r

Description

cluster traces in space (and/or time) using DBscan

Usage

1
clusterTraces(dtf, coord = c("x", "y"), eps, minPts, method, ...)

Arguments

dtf

data frame with coordinates and traces ID

coord

coordinates dataframe (x,y) or (x,y,t)

eps

Reachability distance, see Ester et al. (1996).

minPts

Reachability minimum no. of points, see Ester et al. (1996).

method

"dist" treats data as distance matrix (relatively fast but memory expensive), "raw" treats data as raw data and avoids calculating a distance matrix (saves memory but may be slow), "hybrid" expects also raw data, but calculates partial distance matrices (very fast with moderate memory requirements).

Author(s)

JuG

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
xmlPath <- "//Users/jgodet/Seafile/MaBibliotheque/Hanna/1_3_MMStack_Pos0.ome.xml"
data <- readTrackMateXML(XMLpath = xmlPath)
data$jump<-jump(data, spaceRes=1)
bacteria <- clusterTraces(dtf = data, eps = .2,minPts = 100)
table(bacteria)
bact1 <- data[which(bacteria==7),]
summary(bact1)
bact1 %>% select(x,y) %>% plot(., asp=1)
drawRod(data = getContour(bact1),col='green')
drawRod(data = getContour(cleanNearest(data = bact1,k = 3)),col='blue')

jgodet/trackR documentation built on May 24, 2020, 2:21 p.m.