readDiatrack-methods: readDiatrack

Description Usage Arguments Details Value Examples

Description

read output file (tracks/trajecotries) from Diatrack.

Usage

1
2
3
readDiatrack(folder, merge = F, ab.track = F, mask = F, cores = 1, frameRecord = T)

.readDiatrack(file, interact = F, ab.track = F, frameRecord = F)

Arguments

frameRecord

Add a fourth column to the track list after the xyz-coordinates for the frame that coordinate point was found (especially helpful when linking frames).

folder

Full path to Diatrack output file.

merge

An logical indicate if the output list should be merged into one. Default merge = FALSE, output list is divided by file names.

mask

An logical indicate if image mask should be applied to screen tracks. Default False. Note the mask file should have the same name as the Diatrack output txt file with a "_MASK.tif" ending. Users can use plotMask() and plotTrackOverlay() to see the mask and its effect on screening tracks.

cores

Number of cores used for parallel computation. This can be the cores on a workstation, or on a cluster. Tip: each core will be assigned to read in a file when paralelled.

Details

default merge = FALSE, so the researcher can assay variations between files. Keep both output as two level list is for simplicity of downstream analysis.

Note: the folder name should not contain ".", as it is a key charactero for subsequent indexing of file names.

the absolute coordinates trajectory has moved

trackID=fileID.frameID.duration.indexPerFile.indexPerTrackll

This "indexPerFile" is the index within a diatrackFile.

This "indexPerTrackll" is the index within a trackll, which is unique.

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
folder=system.file("extdata","SWR1",package="smt")
trackll=readDiatrack(folder)
str(trackll,max.level=2)

# Not run:
# masking with image mask
# trackll.masked=readDiatrack(folder=track.folder,merge=F,mask=T)
# str(trackll.masked,1)

# compare the masking effect
# plotTrackOverlay(trackll)
# plotTrackOverlay(trackll.masked)

# plot mask
# mask.list=list.files(path=folder,pattern="_MASK.tif",full.names=T)
# plotMask(mask.file=mask.list[[1]])

sheng-liu/smt documentation built on May 29, 2019, 9:22 p.m.