plotTrack-methods: plotTrack

Description Usage Arguments Details Value Examples

Description

Plot track/trajectory from track list. either randomly or specified.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plotTrack(ab.trackll,resolution=0.107,frame.min=8,frame.max=100,
          frame.start=1,frame.end=500)

plotTrackFromIndex(index.file, movie.folder=c(folder1,folder2,...),
                   resolution=0.107,frame.min=1,frame.max=100,
                   frame.start=1,frame.end=500)

plotTrackOverlay(trackll,max.pixel=128,nrow=2,ncol=2,width=16,height=16)

plotNucTrackOverlay(folder,trackll=NULL,mask=F,cores=1,
                    max.pixel=128,nrow=2,ncol=2,width=16,height=16)

plotComponentTrackOverlay(folder,trackll.sel=NULL,
                    max.pixel=128,nrow=2,ncol=2,width=16,height=16)

plotMask(folder,max.pixel=128,nrow=2,ncol=2,width=16,height=16)

Arguments

resolution

ratio of pixel to µM.

frame.min

minimum frame number for plotting.

frame.max

max frame number for plotting.

frame.start

the first frame to plot. Default 1.

frame.end

last frame to plot. Default 500.

ab.trackll

absolute coordinates for plotting, generated from readDiatrack(folder,ab.track=T).

index.file

a csv file that contains index of tracks in the first column. Leave a header line when preparing such a file.

movie.folder

the path to the folder which contains Diatrack output txt files (presumably it is the same folder with movie files).

mask.file

path to the mask file.

max.pixel

Number of pixels of imaging regime.

nrow

Number of rows in the final plot.

ncol

Number of colums in the final plot.

width

Width of the page for plotting.

height

Height of the page for plotting.

trackll.sel

Selected component trajectory output by selComponentTracks().

Details

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
folder=system.file("extdata","SWR1",package="smt")
trackll.ab=readDiatrack(folder,ab.track=TRUE)
plotTrack(trackll.ab)

## plot from index file
index.file=system.file("extdata","INDEX","indexFile.csv",package="smt")
movie.folder=system.file("extdata","SWR1",package="smt")
plotTrackFromIndex(index.file=index.file,movie.folder = movie.folder)

## index file contain trajectories from multiple movie folders
folder1=system.file("extdata","SWR1",package="smt")
folder2=system.file("extdata","HTZ1",package="smt")
index.file2=system.file("extdata","INDEX","indexFile2.csv",package="smt")
plotTrackFromIndex(index.file=index.file2,movie.folder = c(folder1,folder2))

## masking with image mask
track.folder=system.file("extdata","SWR1_2",package="smt")
trackll=readDiatrack(folder=track.folder,merge=F,mask=F)
trackll.masked=readDiatrack(folder=track.folder,merge=F,mask=T)
str(trackll,1)
str(trackll.masked,1)

## compare the masking effect
plotTrackOverlay(trackll,nrow=1,ncol=1,width=8,height=8)
plotTrackOverlay(trackll.masked,nrow=1,ncol=1,width=8,height=8)

## compare masking effect with nuclei image
plotNucTrackOverlay(folder=track.folder,trackll,
                    nrow=1,ncol=1,width=8,height=8)
plotNucTrackOverlay(folder=track.folder,trackll.masked,
                    nrow=1,ncol=1,width=8,height=8)

## plot mask
plotMask(track.folder,nrow=1,ncol=1,width=8,height=8)


## plotComponentTrackOverlay (see selComponentTracks() for more details)
folder2=system.file("extdata","SWR1_2",package="smt")
trackll=readDiatrack(folder2,merge=F)

## use merge=T for per folder comparison, the analsyis result can't be plot
back to original image. To see component tracks on original nuclei image,
set merge=F, for per movie analysis.

## compute MSD
MSD=msd(trackll=trackll,plot=T)
msd(trackll=trackll,summarize=T,plot=T)

## calculate Dcoef
dcoef=Dcoef(MSD=MSD,method="static",plot=TRUE)

## fit normal distribution to define component
## set seed to reproduce results (see fitNormalDistr() for details on seed)
fit=fitNormDistr(
       dcoef,components=2,log.transform=T,combine.plot=F,output=F,seed=481)

## select component tracks based on fitting
trackll.sel=selComponentTracks(
      fit=fit,likelihood = 0.9,dcoef = dcoef,log.transformed = T,output = F)

## plot component tracks
plotComponentTrackOverlay(folder2,trackll.sel=trackll.sel)

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